]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "network/ndisc: ignore most fields of RA header when lifetime is zero"
authorIvan Shapovalov <intelfx@intelfx.name>
Sun, 16 Jun 2024 08:46:34 +0000 (10:46 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 30 Jul 2024 20:42:56 +0000 (22:42 +0200)
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.

src/network/networkd-ndisc.c

index 521a64253c4a263f8f5e075a56025fe9c62030bb..e2b00506782acd741d3c20329a2402cdfc9e19d9 100644 (file)
@@ -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;