From: Ivan Shapovalov Date: Sun, 16 Jun 2024 08:46:34 +0000 (+0200) Subject: Revert "network/ndisc: ignore most fields of RA header when lifetime is zero" X-Git-Tag: v257-rc1~800 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7767896d127264f660e1e8a714e5cd760840921f;p=thirdparty%2Fsystemd.git Revert "network/ndisc: ignore most fields of RA header when lifetime is zero" This reverts commit ffef01acddcac27caaef02f7f28bff03d7799e5e. Similar to 2d393b1b6d8 ("network: IPv6 Compliance: Router Advertisement Processing, Reachable Time [v6LC.2.2.15]"), Extract from: https://www.ietf.org/rfc/rfc4861.html#section-4.2, p.21, first paragraph: The Router Lifetime applies only to the router's usefulness as a default router; it does not apply to information contained in other message fields or options. So it does not make sense to prevent DHCPv6 when Router Lifetime is 0. Fixes #33357. --- diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index 521a64253c4..e2b00506782 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -2081,12 +2081,6 @@ static int ndisc_start_dhcp6_client(Link *link, sd_ndisc_router *rt) { assert(link); assert(link->network); - /* Do not start DHCPv6 client if the router lifetime is zero, as the message sent as a signal of - * that the router is e.g. shutting down, revoked, etc,. */ - r = sd_ndisc_router_get_lifetime(rt, NULL); - if (r <= 0) - return r; - switch (link->network->ndisc_start_dhcp6_client) { case IPV6_ACCEPT_RA_START_DHCP6_CLIENT_NO: return 0;