mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Tweak definition of a permanent IPv6 address on Linux.
The linux kernel treats all addresses with a limited lifetime as being non permanent, but when taking over the prefix livetimes from upstream assigned prefixes through DHCP, addresses will always have a limited lifetime. Still reject temporary addresses, as they indicate autoconfigured interfaces. Contributed by T-Labs, Deutsche Telekom Innovation Laboratories Signed-off-by: Jonas Gorski<jogo@openwrt.org>
This commit is contained in:
committed by
Simon Kelley
parent
dd0e0a3995
commit
57ab36e77d
@@ -264,10 +264,10 @@ int iface_enumerate(int family, void *parm, int (*callback)())
|
|||||||
|
|
||||||
if (ifa->ifa_flags & IFA_F_DEPRECATED)
|
if (ifa->ifa_flags & IFA_F_DEPRECATED)
|
||||||
flags |= IFACE_DEPRECATED;
|
flags |= IFACE_DEPRECATED;
|
||||||
|
|
||||||
if (ifa->ifa_flags & IFA_F_PERMANENT)
|
|
||||||
flags |= IFACE_PERMANENT;
|
|
||||||
|
|
||||||
|
if (!(ifa->ifa_flags & IFA_F_TEMPORARY))
|
||||||
|
flags |= IFACE_PERMANENT;
|
||||||
|
|
||||||
if (addrp && callback_ok)
|
if (addrp && callback_ok)
|
||||||
if (!((*callback)(addrp, (int)(ifa->ifa_prefixlen), (int)(ifa->ifa_scope),
|
if (!((*callback)(addrp, (int)(ifa->ifa_prefixlen), (int)(ifa->ifa_scope),
|
||||||
(int)(ifa->ifa_index), flags,
|
(int)(ifa->ifa_index), flags,
|
||||||
|
|||||||
Reference in New Issue
Block a user