summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2016-01-20 17:45:42 +0100
committerTom Gundersen <teg@jklm.no>2016-01-20 17:45:42 +0100
commitbedfbf8d335bddd6c320c1ac7f2a92de6bdb784a (patch)
treef2f9948ea0422d629786ea7629090ce7b0ad94a1 /src
parentd90833c93c5fd171440d0d5bbe42f5aab88e393f (diff)
parentf217be196ef831df7226bfd5ee6f10149d5b5787 (diff)
Merge pull request #2337 from dhxgit/patch-1
Fix IPv6PrivacyExtension (networkd-ndisc.c)
Diffstat (limited to 'src')
-rw-r--r--src/basic/missing.h4
-rw-r--r--src/network/networkd-ndisc.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/basic/missing.h b/src/basic/missing.h
index 2d2785bead..c187afa287 100644
--- a/src/basic/missing.h
+++ b/src/basic/missing.h
@@ -974,6 +974,10 @@ static inline int setns(int fd, int nstype) {
#define IFA_FLAGS 8
#endif
+#ifndef IFA_F_MANAGETEMPADDR
+#define IFA_F_MANAGETEMPADDR 0x100
+#endif
+
#ifndef IFA_F_NOPREFIXROUTE
#define IFA_F_NOPREFIXROUTE 0x200
#endif
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c
index ce9e513ceb..483efd17c3 100644
--- a/src/network/networkd-ndisc.c
+++ b/src/network/networkd-ndisc.c
@@ -89,7 +89,7 @@ static void ndisc_prefix_autonomous_handler(sd_ndisc *nd, const struct in6_addr
address->in_addr.in6.__in6_u.__u6_addr8[15] = link->mac.ether_addr_octet[5];
}
address->prefixlen = prefixlen;
- address->flags = IFA_F_NOPREFIXROUTE;
+ address->flags = IFA_F_NOPREFIXROUTE|IFA_F_MANAGETEMPADDR;
address->cinfo.ifa_prefered = lifetime_preferred;
address->cinfo.ifa_valid = lifetime_valid;