diff options
author | Matt Muggeridge <LiveFreeAndRoam@gmail.com> | 2024-05-13 23:50:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-13 23:50:51 +0200 |
commit | 2d393b1b6d8c8cb131b70714ef5cd2d5d1c446bf (patch) | |
tree | ec8d5eb13c04d3036cc90951f621cb94040bab6c /src | |
parent | curl-glue: catch libcurl attempting to change timeout handler when we destroy... (diff) | |
download | systemd-2d393b1b6d8c8cb131b70714ef5cd2d5d1c446bf.tar.xz systemd-2d393b1b6d8c8cb131b70714ef5cd2d5d1c446bf.zip |
network: IPv6 Compliance: Router Advertisement Processing, Reachable Time [v6LC.2.2.15] (#32792)
Previously, RA option fields were being ignored when the Router Lifetime
value was zero. Remove this logic to be compliant with RFC4861.
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.
This affected IPv6 Conformance test:
v6LC.2.2.15: Router Advertisement Processing, Reachable Time.
Fixes #31842.
Co-authored-by: Matt Muggeridge <Matt.Muggeridge@hpe.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/network/networkd-ndisc.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index 92ff7c71f3..b1451817bc 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -913,11 +913,6 @@ static int ndisc_router_process_reachable_time(Link *link, sd_ndisc_router *rt) if (!link->network->ndisc_use_reachable_time) return 0; - /* Ignore the reachable time field of the RA header if the lifetime is zero. */ - r = sd_ndisc_router_get_lifetime(rt, NULL); - if (r <= 0) - return r; - r = sd_ndisc_router_get_reachable_time(rt, &reachable_time); if (r < 0) return log_link_warning_errno(link, r, "Failed to get reachable time from RA: %m"); @@ -951,11 +946,6 @@ static int ndisc_router_process_retransmission_time(Link *link, sd_ndisc_router if (!link->network->ndisc_use_retransmission_time) return 0; - /* Ignore the retransmission time field of the RA header if the lifetime is zero. */ - r = sd_ndisc_router_get_lifetime(rt, NULL); - if (r <= 0) - return r; - r = sd_ndisc_router_get_retransmission_time(rt, &retrans_time); if (r < 0) return log_link_warning_errno(link, r, "Failed to get retransmission time from RA: %m"); @@ -989,11 +979,6 @@ static int ndisc_router_process_hop_limit(Link *link, sd_ndisc_router *rt) { if (!link->network->ndisc_use_hop_limit) return 0; - /* Ignore the hop limit field of the RA header if the lifetime is zero. */ - r = sd_ndisc_router_get_lifetime(rt, NULL); - if (r <= 0) - return r; - r = sd_ndisc_router_get_hop_limit(rt, &hop_limit); if (r < 0) return log_link_warning_errno(link, r, "Failed to get hop limit from RA: %m"); @@ -1029,11 +1014,6 @@ static int ndisc_router_process_mtu(Link *link, sd_ndisc_router *rt) { if (!link->network->ndisc_use_mtu) return 0; - /* Ignore the MTU option if the lifetime is zero. */ - r = sd_ndisc_router_get_lifetime(rt, NULL); - if (r <= 0) - return r; - r = sd_ndisc_router_get_mtu(rt, &mtu); if (r == -ENODATA) return 0; @@ -2459,7 +2439,6 @@ int ndisc_stop(Link *link) { return sd_ndisc_stop(link->ndisc); } - void ndisc_flush(Link *link) { assert(link); |