Merge pull request #6910 from ssahani/issue-6359

networkd: For IPv6 addresses do not treat IFA_F_DEPRECATED as not ready. (Fix #6359)
This commit is contained in:
Lennart Poettering
2017-11-20 19:21:36 +01:00
committed by GitHub
2 changed files with 8 additions and 1 deletions
+4 -1
View File
@@ -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,
+4
View File
@@ -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");