DHCP plugin returns virtual IPs for IPv4 requests only

This commit is contained in:
Martin Willi
2012-08-30 16:43:44 +02:00
parent 769446a8c7
commit 980c468cdc
+2 -2
View File
@@ -84,7 +84,7 @@ METHOD(attribute_provider_t, acquire_address, host_t*,
private_dhcp_provider_t *this, char *pool,
identification_t *id, host_t *requested)
{
if (streq(pool, "dhcp"))
if (streq(pool, "dhcp") && requested->get_family(requested) == AF_INET)
{
dhcp_transaction_t *transaction, *old;
host_t *vip;
@@ -110,7 +110,7 @@ METHOD(attribute_provider_t, release_address, bool,
private_dhcp_provider_t *this, char *pool,
host_t *address, identification_t *id)
{
if (streq(pool, "dhcp"))
if (streq(pool, "dhcp") && address->get_family(address) == AF_INET)
{
dhcp_transaction_t *transaction;