Paul Maddock
2018-06-08 23:47:59 UTC
Hi,
I think I've come across a bug with how the domain is determined for reverse
lookups for IPv6 addresses. Having set a domain config with my domain name and
IPv6 prefix I was correctly seeing the domain passed to the clients via DHCPv6,
but DNS lookups on the IPv6 returned my fallback domain.
Having checked the source code I think the problem is in the read_leases
function. For IPv6 is appears to be trying to find the domain based on the
hwaddr instead of the IPv6 address. I've recompiled with the below patch and
I'm now getting the expected domain.
Please review and apply the fix as necessary.
--- dnsmasq/src/lease.c 2018-06-08 22:32:29.486011028 +0000
+++ dnsmasq/src/lease.c 2018-06-08 22:33:31.118012520 +0000
@@ -87,7 +87,7 @@
if ((lease = lease6_allocate(&addr.addr.addr6, lease_type)))
{
lease_set_iaid(lease, strtoul(s, NULL, 10));
- domain = get_domain6((struct in6_addr *)lease->hwaddr);
+ domain = get_domain6(&lease->addr6);
}
}
#endif
Regards,
Paul
I think I've come across a bug with how the domain is determined for reverse
lookups for IPv6 addresses. Having set a domain config with my domain name and
IPv6 prefix I was correctly seeing the domain passed to the clients via DHCPv6,
but DNS lookups on the IPv6 returned my fallback domain.
Having checked the source code I think the problem is in the read_leases
function. For IPv6 is appears to be trying to find the domain based on the
hwaddr instead of the IPv6 address. I've recompiled with the below patch and
I'm now getting the expected domain.
Please review and apply the fix as necessary.
--- dnsmasq/src/lease.c 2018-06-08 22:32:29.486011028 +0000
+++ dnsmasq/src/lease.c 2018-06-08 22:33:31.118012520 +0000
@@ -87,7 +87,7 @@
if ((lease = lease6_allocate(&addr.addr.addr6, lease_type)))
{
lease_set_iaid(lease, strtoul(s, NULL, 10));
- domain = get_domain6((struct in6_addr *)lease->hwaddr);
+ domain = get_domain6(&lease->addr6);
}
}
#endif
Regards,
Paul