diff options
author | Dominik Hannen <dhxgit@users.noreply.github.com> | 2016-01-15 23:39:54 +0100 |
---|---|---|
committer | Dominik Hannen <cantares1+git@gmail.com> | 2016-01-16 00:44:46 +0100 |
commit | f217be196ef831df7226bfd5ee6f10149d5b5787 (patch) | |
tree | ef87d297ea04f489ef533788cef0c58d0421a5e9 | |
parent | 05c72f0f186e66788e036335ada4ce8932166f47 (diff) |
Fix IPv6PrivacyExtension (networkd-ndisc.c)
This small addition fixes the issues #1982 and #2242.
IPv6PrivacyExtension now works as expected even when a RA is received.
-rw-r--r-- | src/basic/missing.h | 4 | ||||
-rw-r--r-- | src/network/networkd-ndisc.c | 2 |
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; |