]> git.ipfire.org Git - thirdparty/systemd.git/commit
IPv6 RA: Support the Retrans Timer field (IPv6 Conformance Test: v6LC.2.1.5)
authorMatt Muggeridge <Matt.Muggeridge2@hpe.com>
Mon, 22 Jan 2024 09:55:41 +0000 (19:55 +1000)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 22 Jan 2024 18:18:01 +0000 (03:18 +0900)
commitd4c8de21a07d015f2f2c787e0735be5e4d02fb3c
treefbf53b077149fcda718a584201117a40fe90b881
parentafd08d7740da1cd987739926f52e266a9d15001f
IPv6 RA: Support the Retrans Timer field (IPv6 Conformance Test: v6LC.2.1.5)

The RA's Retransmission Timer field was being ignored. This resolves the IPv6
Core Conformance test, v6LC.2.1.5 [1].

Retransmission Timer is a 32-bit unsigned integer. The time, in milliseconds,
between retransmitted Neighbor Solicitation messages. Used by the Address
Resolution and Neighbor Unreachability Detection (NUD) algorithm.

Support setting a default value for the neighbour retransmission timer value with:

    [Network]
    IPv6RetransmissionTimeSec=<int>

By default, upon receiving a Router Advertisement with the Retransmission Timer
field set to a non-zero value, it will update the kernel's retransmit timer value.
To disable this behaviour, configure the UseIPv6RetransmissionTime= under the
[IPv6AcceptRA] section.

    [IPv6AcceptRA]
    UseIPv6RetransmissionTime=<bool>

RFC4861: Neighbor Discovery in IPv6
  * Section 4.2 RA Message Format.
  * Section 6.3.4 Processing Received Router Advertisements

A Router Advertisement field (e.g., Cur Hop Limit, Reachable Time,
and Retrans Timer) may contain a value denoting that it is
unspecified. In such cases, the parameter should be ignored and the
host should continue using whatever value it is already using. In
particular, a host MUST NOT interpret the unspecified value as
meaning change back to the default value that was in use before the
first Router Advertisement was received.

The RetransTimer variable SHOULD be copied from the Retrans Timer
field, if the received value is non-zero.

References
[1] IPv6 Core Conformance Spec (PDF)
21 files changed:
man/systemd.network.xml
src/basic/sysctl-util.c
src/basic/sysctl-util.h
src/libsystemd-network/ndisc-router.c
src/libsystemd-network/ndisc-router.h
src/libsystemd-network/test-ndisc-rs.c
src/network/networkd-ndisc.c
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h
src/network/networkd-sysctl.c
src/systemd/sd-ndisc.h
test/test-network/conf/25-dummy.netdev [new file with mode: 0644]
test/test-network/conf/25-dummy.network [new file with mode: 0644]
test/test-network/conf/25-ipv6-neigh-retrans-time-0s.network [new file with mode: 0644]
test/test-network/conf/25-ipv6-neigh-retrans-time-3s.network [new file with mode: 0644]
test/test-network/conf/25-ipv6-neigh-retrans-time-4s.network [new file with mode: 0644]
test/test-network/conf/25-ipv6-neigh-retrans-time-infinity.network [new file with mode: 0644]
test/test-network/conf/25-ipv6-neigh-retrans-time-invalid.network [new file with mode: 0644]
test/test-network/conf/25-ipv6-neigh-retrans-time-toobig.network [new file with mode: 0644]
test/test-network/systemd-networkd-tests.py