1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 10:25:37 +03:00
Commit Graph

660 Commits

Author SHA1 Message Date
Yu Watanabe
322bda8241
Merge pull request #27826 from yuwata/network-link-ready-without-ndisc-when-has-static-address
network: do not request dynamic addressing protocols finished when at…
2023-06-01 06:29:55 +09:00
Yu Watanabe
2f96a29c2c wait-online: request that at least one managed online interface exists
Fixes a regression caused by ab3aed4a03.

I thought the commit does not cause any severe regression. However,
drivers for network interfaces may be loaded later. So, we should wait
if no network interface is found.

Fixes #27822.
2023-05-31 22:12:03 +02:00
Yu Watanabe
9e7d91ed97 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.
2023-05-30 17:39:11 +09:00
Yu Watanabe
73d24e45f8 test-network: add tests for vlan QoS mapping 2023-05-24 11:15:44 +09:00
Yu Watanabe
82c60c939c test-network: add tests for static lease matching with chaddr
Follow-up for 4646cdaa37 (#27313).
2023-05-12 03:07:10 +09:00
Yu Watanabe
8e2449a5c9 test-network: add workaround for bug in iproute2 v6.2.0
Closes #27473.
2023-05-01 20:02:15 +02:00
Daan De Meyer
3ceb96e018 test: Install systemd-networkd-tests.py when install_tests is enabled 2023-03-29 12:18:42 +02:00
Dmitry V. Levin
30fd9a2dab treewide: fix a few typos in NEWS, docs and comments 2023-02-15 10:41:03 +00:00
Yu Watanabe
e5e0743189 network: assume prefix length is full address size
The commit 0f707207b9 enables strong
warning about missing prefix length in Address= setting.
The change was done in v241, and was about 4 years ago.
Let's drop the legacy assumption and make the parser consistent with
'ip address' command.

C.f. #11307.
Closes #26102.
2023-01-19 22:09:10 +09:00
Yu Watanabe
a93cc5d911 test-network: drop unused file 2023-01-19 21:22:22 +09:00
Yu Watanabe
df0a741cdd test-network: reprocess the loopback network interface
Fixes the issue reported at https://github.com/systemd/systemd-centos-ci/pull/585#issuecomment-1385537641.
2023-01-18 14:08:14 +00:00
Yu Watanabe
56dfde0d54 test-network: add testcase for no managed interface 2022-12-22 16:42:55 +09:00
Yu Watanabe
b09ec84700 test-network: split out wait-online related test case 2022-12-22 16:29:20 +09:00
Yu Watanabe
5432adae82 test-network: move one test case 2022-12-22 16:27:58 +09:00
Nick Rosbrook
f68f644a16 test-network: add a test for renaming device to current altname 2022-12-15 10:36:14 -05:00
Yu Watanabe
b448fc0a6f test-network: try to change MAC address more
Follow-up for 23b6bf274f.
2022-12-07 15:08:23 +01:00
Jian Zhang
23b6bf274f test-network: add test for bond mac address config
Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
2022-12-06 14:41:31 +08:00
Yu Watanabe
77d5f36d93 test-network: add tests for RTT and ACK filter for CAKE 2022-11-19 07:08:26 +09:00
Yu Watanabe
7618ab1b71 test-network: skip test_match if alternative name is not supported by kernel
Fixes #25259.
2022-11-10 10:05:43 +00:00
Yu Watanabe
fcd7998880 test-network: wait for bound interface to be processed by udevd
If another bound interface (dummy98) will be removed before that dummy99
is processed by udevd, then removing dummy98 in the next step makes the
target interface (test1) bring down.

Follow-up for 3e2f7c46da.
2022-11-02 08:24:01 +09:00
Luca Boccassi
2f23762451
Merge pull request #25192 from yuwata/wait-online-altname
wait-online: support alternative interface names
2022-11-01 18:31:08 +01:00
Yu Watanabe
d8746f1620 test-network: explicitly prepare default.link
On CentOS CI (Arch), 99-default.link is masked. Let's explicitly provide
the same .link file with a different prefix number.
2022-11-01 22:38:37 +09:00
Yu Watanabe
b95d35b5ed test-network: resolve interface name from alternative name 2022-11-01 22:38:37 +09:00
Yu Watanabe
d7ff72ec9c test-network: fix use of undeclared variable 2022-11-01 22:38:37 +09:00
Yu Watanabe
dee6c26f3e test-network: make link_exists() support alternative names 2022-11-01 22:38:37 +09:00
Yu Watanabe
3e2f7c46da test-network: add a testcase that all bound interfaces removed
Closes #4202.
2022-11-01 10:28:57 +00:00
Luca Boccassi
0be7f1936c
Merge pull request #25143 from yuwata/network-reconfigure-interface-when-renamed
network: reconfigure interface when renamed
2022-10-31 21:14:24 +01:00
Luca Boccassi
4b9cfe08ba
Merge pull request #25166 from yuwata/network-router-preference
network: adjust route metric based on router preference
2022-10-31 20:59:36 +01:00
Yu Watanabe
fa4d3fed46 test-network: add testcase for reconfiguring interface 2022-10-31 09:35:05 +09:00
Frantisek Sumsal
f9073c24de test-network: suppress a couple of minor pylint complaints 2022-10-30 20:52:24 +01:00
Frantisek Sumsal
ef11b841cd test-network: sort standard imports before "third-party" ones 2022-10-30 20:52:20 +01:00
Frantisek Sumsal
e43776595c test-network: drop a couple of useless f-strings 2022-10-30 20:43:35 +01:00
Frantisek Sumsal
0677130e81 test-network: use raw strings where appropriate 2022-10-30 20:43:28 +01:00
Frantisek Sumsal
b3de9d7bda test-network: re-enable test_macsec
The outstanding kernel panic should be already fixed in recent enough
kernels by [0]. To make the test safe to run anywhere, let's implement
a simple kernel version check and run the test only if we're running
with at least kernel 6.x. The patch might be in some 5.x kernels as
well, but let's be on the safe side and use 6.x as a baseline here
(which is currently the case for Arch and Fedora Rawhide anyway).

[0] https://lore.kernel.org/netdev/7b3fd03e1a46047e5ffe2a389fe74501f0a93206.1656519221.git.sd@queasysnail.net/T/#u
2022-10-30 20:42:11 +01:00
Yu Watanabe
ee3cbfdbbc test-network: rewrite wait-online address family tests
Fixes #25154.
2022-10-28 12:26:52 +02:00
Yu Watanabe
bb80f633bf test-network: add testcase for router preference 2022-10-28 15:56:59 +09:00
Yu Watanabe
b4f4f1191e test-network: show only IPv4 routes 2022-10-28 11:35:28 +09:00
Zbigniew Jędrzejewski-Szmek
0923b4253c tree-wide: replace "plural(s)" by "plurals"
(s) is just ugly with a vibe of DOS. In most cases just using the normal plural
form is more natural and gramatically correct.

There are some log_debug() statements left, and texts in foreign licenses or
headers. Those are not touched on purpose.
2022-10-17 15:10:53 +02:00
Yu Watanabe
767bc538c5 test-network: fix matching string
This partially reverts 5515f2169c.
As the commit changes 'networkctl list', not 'networkctl status'.
2022-09-23 10:43:17 +09:00
Zbigniew Jędrzejewski-Szmek
5515f2169c networkctl: use "-" for empty fields
This looks nicer. Some fields were already using "-" as fallback, e.g. Speed,
so this makes things more consistent too.
2022-09-21 14:48:28 +02:00
Topi Miettinen
a4640bed74 test: testing for networkd NetLabel feature 2022-08-29 14:23:17 +09:00
Yu Watanabe
8d2a55025b test-network: add missing online check 2022-08-28 08:07:25 +00:00
Yu Watanabe
93e898d624 test-network: add test for TCPCongestionControlAlgorithm= 2022-08-26 19:47:27 +09:00
Yu Watanabe
b249834bc3 test-network: add test for issue #24377
The issue has been already fixed by
b05e52000b (PR #24020).
2022-08-20 20:50:02 +09:00
Yu Watanabe
5bd2a7c580 test-network: add helper functions for reading logs of networkd 2022-08-20 20:35:18 +09:00
Yu Watanabe
3af934bceb test-network: add tests for IPv4ACD and renewing DHCP address 2022-08-18 15:44:53 +09:00
Yu Watanabe
fd022b1da5 test-network: drop unused .network file 2022-08-18 15:44:53 +09:00
Yu Watanabe
59edcf2b64 test-network: add/update module check
For https://github.com/systemd/systemd-centos-ci/pull/517.
2022-08-17 10:05:20 +00:00
Luca Boccassi
e4e6cfaad0
Merge pull request #24301 from yuwata/network-tuntap
network/tuntap: introduce KeepFileDescriptor= setting
2022-08-16 23:06:16 +01:00
Yu Watanabe
21d0ed68ee test-network: add tests for MTUBytes= for bridge master and ports
Prompted by #24311.
2022-08-16 21:46:40 +00:00