mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Check IPv4-mapped IPv6 addresses with --stop-rebind.
This commit is contained in:
@@ -115,6 +115,9 @@ version 2.73
|
|||||||
header to 1280 bytes. If it then answers, make that
|
header to 1280 bytes. If it then answers, make that
|
||||||
change permanent.
|
change permanent.
|
||||||
|
|
||||||
|
Check IPv4-mapped IPv6 addresses when --stop-rebind
|
||||||
|
is active. Thanks to Jordan Milne for spotting this.
|
||||||
|
|
||||||
|
|
||||||
version 2.72
|
version 2.72
|
||||||
Add ra-advrouter mode, for RFC-3775 mobile IPv6 support.
|
Add ra-advrouter mode, for RFC-3775 mobile IPv6 support.
|
||||||
|
|||||||
@@ -1117,11 +1117,24 @@ int extract_addresses(struct dns_header *header, size_t qlen, char *name, time_t
|
|||||||
memcpy(&addr, p1, addrlen);
|
memcpy(&addr, p1, addrlen);
|
||||||
|
|
||||||
/* check for returned address in private space */
|
/* check for returned address in private space */
|
||||||
if (check_rebind &&
|
if (check_rebind)
|
||||||
(flags & F_IPV4) &&
|
{
|
||||||
|
if ((flags & F_IPV4) &&
|
||||||
private_net(addr.addr.addr4, !option_bool(OPT_LOCAL_REBIND)))
|
private_net(addr.addr.addr4, !option_bool(OPT_LOCAL_REBIND)))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
|
if ((flags & F_IPV6) &&
|
||||||
|
IN6_IS_ADDR_V4MAPPED(&addr.addr.addr6))
|
||||||
|
{
|
||||||
|
struct in_addr v4;
|
||||||
|
v4.s_addr = ((const uint32_t *) (&addr.addr.addr6))[3];
|
||||||
|
if (private_net(v4, !option_bool(OPT_LOCAL_REBIND)))
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HAVE_IPSET
|
#ifdef HAVE_IPSET
|
||||||
if (ipsets && (flags & (F_IPV4 | F_IPV6)))
|
if (ipsets && (flags & (F_IPV4 | F_IPV6)))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user