From 1cdeda986a52de77285396b84fba531934ccd6c7 Mon Sep 17 00:00:00 2001 From: Ivan Shapovalov Date: Sun, 16 Jun 2024 10:46:34 +0200 Subject: [PATCH] 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. (cherry picked from commit 7767896d127264f660e1e8a714e5cd760840921f) --- src/network/networkd-ndisc.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index 50d284b26a..84558a5afc 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -2080,12 +2080,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; -- 2.25.1