]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/network/networkd-link.c
network: do not request dynamic addressing protocols finished when at least one stati... 27826/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 29 May 2023 03:56:30 +0000 (12:56 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 30 May 2023 08:39:11 +0000 (17:39 +0900)
commit9e7d91ed97a008a47e347d99b02de376d55d3449
tree330f83058b4fc7528357c8a00d71bd652eba6333
parent195b83edf852f4e40e0d3a3b630cde97c84d77ba
network: do not request dynamic addressing protocols finished when at least one static address is configured

The setting IPv6AcceptRA= is defaults to yes, hence, even if a .network
file for an interface has static IP address configuration, it may takes
few seconds for the interface being configured state, as NDisc for the
interface needs to be finished. That makes wait-online.service
needlessly slow. Typically, such delay is not necessary for statically
configured networks.

Let's make the required condition slightly relaxed; if a .network file
has static IP address configurations, then let's make the matching
interface enter the 'configured' state soon after the static addresses
configured on the interface.

Note, this does not change the default for IPv6AcceptRA=, hence, NDisc
still runs on interfaces by default. So, addresses, routes, DNS servers,
and so on based on RA will be assigned on interfaces later.

Strictly speaking, this breaks backward compatibility, but the previous
behavior is not clearly documented. If a user requested both static
IPv4 address and IPv6 SLAAC address configured before an interface being
entered to the 'configured' state, then '--ipv6' for wait-online can be
used. So, the behavior change should not cause severe regression.

Closes #27779.
src/network/networkd-link.c
test/test-network/systemd-networkd-tests.py