networkd: ndisc The preferred lifetime is never greater than the valid lifetime.

Silently ignore if the preferred lifetime is never greater than the
valid lifetime.
This commit is contained in:
Susant Sahani 2017-09-25 20:55:12 +05:30
parent b7ed5384ab
commit 92bdc3ffce
1 changed files with 4 additions and 0 deletions

View File

@ -186,6 +186,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");