]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: ndisc The preferred lifetime is never greater than the valid lifetime. 6910/head
authorSusant Sahani <susant@redhat.com>
Mon, 25 Sep 2017 15:25:12 +0000 (20:55 +0530)
committerSusant Sahani <susant@redhat.com>
Tue, 26 Sep 2017 10:56:18 +0000 (16:26 +0530)
Silently ignore if the preferred lifetime is never greater than the
valid lifetime.

src/network/networkd-ndisc.c

index d52b511bb55c5996cf058cae04ec7b00a9845597..5475972ef756f2c7d2f06e118a5ffb43b2997ef2 100644 (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");