summaryrefslogtreecommitdiff
path: root/src/netlink.c
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2014-01-22 11:34:16 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2014-01-22 11:34:16 +0000
commit57ab36e77dbd33decbee03142ad48222d18c5c90 (patch)
tree328dd8b235309a83d89ec5e4a6fc545a4e3c6bcb /src/netlink.c
parentdd0e0a3995ef52de7c3ba1da0b812435922cda62 (diff)
downloaddnsmasq-57ab36e77dbd33decbee03142ad48222d18c5c90.tar.gz
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>
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/netlink.c b/src/netlink.c
index c9d5e22..3c1e465 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -264,10 +264,10 @@ int iface_enumerate(int family, void *parm, int (*callback)())
if (ifa->ifa_flags & IFA_F_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 (!((*callback)(addrp, (int)(ifa->ifa_prefixlen), (int)(ifa->ifa_scope),
(int)(ifa->ifa_index), flags,