diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-11-20 19:21:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-20 19:21:36 +0100 |
commit | 8c6f6a2f91a28df14944e9567ac0dc14893264d5 (patch) | |
tree | 4464f194ed7c3361f62a31d618eb8737f8b53dad | |
parent | Merge pull request #6918 from ssahani/issue-5625 (diff) | |
parent | networkd: ndisc The preferred lifetime is never greater than the valid lifetime. (diff) | |
download | systemd-8c6f6a2f91a28df14944e9567ac0dc14893264d5.tar.xz systemd-8c6f6a2f91a28df14944e9567ac0dc14893264d5.zip |
Merge pull request #6910 from ssahani/issue-6359
networkd: For IPv6 addresses do not treat IFA_F_DEPRECATED as not ready. (Fix #6359)
-rw-r--r-- | src/network/networkd-address.c | 5 | ||||
-rw-r--r-- | src/network/networkd-ndisc.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 2f8edea855..302c75d170 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -979,7 +979,10 @@ int config_parse_address_scope(const char *unit, bool address_is_ready(const Address *a) { assert(a); - return !(a->flags & (IFA_F_TENTATIVE | IFA_F_DEPRECATED)); + if (a->family == AF_INET6) + return !(a->flags & IFA_F_TENTATIVE); + else + return !(a->flags & (IFA_F_TENTATIVE | IFA_F_DEPRECATED)); } int config_parse_router_preference(const char *unit, diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index 8d31accd5c..df4630bf12 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -185,6 +185,10 @@ static void ndisc_router_process_autonomous_prefix(Link *link, sd_ndisc_router * return; } + /* The preferred lifetime is never greater than the valid lifetime */ + if (lifetime_preferred > lifetime_valid) + return; + r = address_new(&address); if (r < 0) { log_link_error_errno(link, r, "Could not allocate address: %m"); |