summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-ndisc.c
diff options
context:
space:
mode:
authorSusant Sahani <susant@redhat.com>2017-09-25 17:25:12 +0200
committerSusant Sahani <susant@redhat.com>2017-09-26 12:56:18 +0200
commit92bdc3ffce6845201b6afa43c64050f31b3b2873 (patch)
treece2eabcba54c34f0f798693a894e0ebd8eda3dea /src/network/networkd-ndisc.c
parentnetworkd: Do not treat IPv6 addresses IFA_F_DEPRECATED as not ready. (diff)
downloadsystemd-92bdc3ffce6845201b6afa43c64050f31b3b2873.tar.xz
systemd-92bdc3ffce6845201b6afa43c64050f31b3b2873.zip
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.
Diffstat (limited to 'src/network/networkd-ndisc.c')
-rw-r--r--src/network/networkd-ndisc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c
index d52b511bb5..5475972ef7 100644
--- a/src/network/networkd-ndisc.c
+++ b/src/network/networkd-ndisc.c
@@ -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");