Commit Graph

373 Commits

Author SHA1 Message Date
Yu Watanabe 0b5dc24953 test-network: add tests for route advmss 2021-01-09 00:01:53 +09:00
Yu Watanabe 49ff3f34d5 test-network: add tests for fib rules with Family=both vs networkctl reload or reconfigure 2020-12-30 03:32:07 +09:00
Yu Watanabe 1e5fd3216a network: set FRA_PROTOCOL to RTPROT_STATIC by default 2020-12-29 16:03:26 +09:00
Yu Watanabe 635f2a6692 test-network: add tests for [IPv6AcceptRA] PrefixDenyList= or friends 2020-12-24 17:16:15 +09:00
Dan Streetman b226c15cfb test-network: increase wait_online timeout to handle longer dhcpv4 transient timeout
Previous commits changed the dhcpv4 retransmission algorithm to be
slightly slower, changing the amount of time it takes to notify
systemd-networkd that the dhcpv4 configuration has (transiently)
failed from around 14 second up to 28 seconds.

Since the test_dhcp_client_with_ipv4ll_without_dhcp_server test
configures an interface to use dhcpv4 without any operating dhcpv4
server running, it must increase the amount of time it waits for
the test interface to reach degraded state.
2020-12-14 18:19:32 -05:00
Yu Watanabe 452d86a532 test-network: add tests for IPv6 routes with reject type 2020-12-04 16:50:35 +09:00
Yu Watanabe 37b9c79e5d test-network: sleep 1s after reloading configs
As interfaces will be reconfigured asynchronously after `networkctl reload`.
So, right after `networkctl reload` is finished, interfaces may be still
in 'configured' state with the old .network files.
2020-12-04 11:28:52 +09:00
Yu Watanabe 240e41372e test-network: confirm that IPv4ll address is dropped after DHCPv4 lease is acquired 2020-12-02 18:50:13 +09:00
Zbigniew Jędrzejewski-Szmek 0107b769b1 networkd: start ipv4ll when dhcp has trouble getting a lease
Fixes #13316.
2020-11-30 12:37:36 +09:00
Zbigniew Jędrzejewski-Szmek 3ca1fab70a networkd: merge ll addressing fallback modes into normal "boolean" values
They are not really boolean, because we have both ipv4 and ipv6, but
for each protocol we have either unset, no, and yes.

From https://github.com/systemd/systemd/issues/13316#issuecomment-582906817:
LinkLocalAddressing must be a boolean option, at least for ipv4:
- LinkLocalAddressing=no => no LL at all.

- LinkLocalAddressing=yes + Static Address => invalid configuration, warn and
  interpret as LinkLocalAddressing=no, no LL at all.

(we check that during parsing and reject)

- LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the
  DHCP one, an LL address must be acquired at start or after a short N
  unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a
  DHCP address is acquired, drop the LL address. If the DHCP address is lost,
  re-adquire a new LL address.

(next patch will move in this direction)

- LinkLocalAddressing=fallback has no reason to exist, because LL address must
  always be allocated as a fallback option when using DHCP. Having both DHCP
  and LL address at the same time is an RFC violation, so
  LinkLocalAdressing=yes correctly implemented is already the "fallback"
  behavior. The fallback option must be deprecated and if present in older
  configs must be interpreted as LinkLocalAddressing=yes.

(removed)

- And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL
  address aren't required to be always set for every IPv6 enabled interface (in
  this case, coexisting with static or dynamic address if any)? Shouldn't be
  always =yes?

(good question)

This effectively reverts 29e81083bd. There is no
special "fallback" mode now, so the check doesn't make sense anymore.
2020-11-30 12:37:36 +09:00
Yu Watanabe dca63b5b46
Merge pull request #17474 from yuwata/network-drop-link-deserialization-logic
network: drop link deserialization logic
2020-11-27 09:08:01 +09:00
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Yu Watanabe 7b829a7b3b network: do not serialize/deserialize addresses
The link state file is always removed when networkd is stopping. So,
the deserialization logic does not work. Moreover, the ADDRESSES=
entry is not used by sd-network, so serialization is also not necessary.
2020-10-28 18:15:57 +09:00
Yu Watanabe 80762cccdc test-network: add a test case for DNSSL in RA
Closes #4590.
2020-10-24 14:08:51 +02:00
Yu Watanabe 43d4bc9f56 test-network: add tests for routes managed by Manager 2020-10-23 23:07:12 +09:00
Yu Watanabe c27abcf4fb network: when Gateway=_dhcp4, set several properties based on lease if they are not explicitly specified
Before this commit, event when Gateway=_dhcp4 or _ra is set, the
route was configured with 'protocol static', and other properties
specified by RouteTable=, RouteMTU=, or etc, were ignored.

This commit makes set the route protocol based on the protocol the
gateway address is obtained, and apply other settings if it is not
explicitly specified in the [Route] section.
2020-10-15 07:06:23 +09:00
Yu Watanabe 21266e60e9 test-network: add test for issue #17304 2020-10-13 20:32:17 +09:00
Yu Watanabe d9005dec6e test-network: do not fail when multiple ipv6 default gateways are configured
When multiple ipv6 default gateways are set, kernel seems to merge them
into a multipath route.
2020-10-08 02:51:23 +09:00
Yu Watanabe 297f9d86fe test-network: add a test case for IPv4 route with IPv6 gateway 2020-10-08 02:51:13 +09:00
Yu Watanabe 66493453b3 test-network: also remove IPv6 rules 2020-10-07 03:23:27 +09:00
Yu Watanabe 713bfdaa6c test-network: add a missing netdev in the list 2020-10-07 03:23:27 +09:00
Yu Watanabe 5cf52d90a9 test-network: add missing file in the list 2020-10-07 03:23:27 +09:00
Zbigniew Jędrzejewski-Szmek 05d418fed9
Merge pull request #17085 from yuwata/network-configure-mdb-entries-on-bridge-master
network: allow to configure mdb entries on bridge master
2020-09-18 13:06:44 +02:00
Yu Watanabe 1034044260
Merge pull request #15050 from ssahani/fq-pie
network: tc: add support for FQ-PIE packet scheduler
2020-09-18 03:50:02 +09:00
Yu Watanabe dc0e90d2e0
Merge pull request #16929 from ssahani/network-bare-udp
network: introduce Bare UDP Tunnelling
2020-09-17 20:34:15 +09:00
Yu Watanabe 9f773037a0 test-network: add test for bridge MDB entries on bridge master 2020-09-17 18:15:25 +09:00
Yu Watanabe 1578266b02 test-network: add tests for FQ-PIE 2020-09-17 17:18:48 +09:00
Yu Watanabe 130604719a test-network: add tests for BareUDP netdev 2020-09-17 16:46:29 +09:00
Yu Watanabe 039971ea43 test-network: add test for Independent= for vxlan 2020-09-17 15:58:41 +09:00
Yu Watanabe cc0276cc3e test-network: add test for [BridgeMDB] section 2020-09-17 00:04:59 +09:00
Yu Watanabe 766f8f388f test-network: add test for ENOBUFS issue #17012
The issue seems already fixed by PR #16982 and its follow-up commit
4934ba2121.
2020-09-11 18:07:47 +02:00
Yu Watanabe 87adeabfb7 test-network: update tests for issue #16784 2020-09-10 18:57:07 +09:00
Yu Watanabe 68248f43fc test-network: add test for IPv6Token=prefixstable 2020-09-08 14:32:44 +09:00
Michael Biebl 3aa645f0c0 test-network: stop networkd and its socket
With the changes from 2c0dffe82d, starting
systemd-networkd.service will also activate systemd-networkd.socket.
When tearing down a test, we need to stop the socket as well, to make
sure networkd can't be activated accidentally with the wrong
configuration.
2020-08-28 21:03:09 +02:00
Yu Watanabe 9dffe6fc27 test-network: add a test case for reconfiguring routing policy rules
C.f. #16784.
2020-08-21 15:27:38 +09:00
Yu Watanabe c9d223e803 test-network: add tests for prefix routes 2020-07-29 01:50:54 +09:00
Yu Watanabe f91b234077 test-network: drop unnecessary sleep() in NetworkdStateFileTests.test_state_file 2020-07-22 19:55:15 +09:00
Yu Watanabe 66479677a9 test-network: add tests for DNS= with port number and SNI 2020-07-21 04:08:22 +09:00
Yu Watanabe 571f953934 test-network: wait for addresses are not in tentative state 2020-07-15 17:15:25 +09:00
Yu Watanabe c5fcd8a70a test-network: check assigned address is not tentative state 2020-07-15 17:14:30 +09:00
Dan Streetman 001c07cfff test-netowrk: in test_bridge_configure_without_carrier, avoid strange test failures
For some reason the wait-online is failing intermittently; it's unclear
exactly why, but this hopefully avoids the failure for unrelated PR.

This is a workaround (not fix) for #16105
2020-07-08 17:05:03 -04:00
Dan Streetman 4e3376d43a test-network: don't print networkctl output for passing subtests
This just clutters up the logs.
2020-07-08 16:13:14 -04:00
Yu Watanabe 3d2c26925f test-network: add tests for SR-IOV
This also adjusts test_sysctl_disable_ipv6(), as rt_trap flag may be
added to routes on some environments.
2020-07-01 13:51:35 +09:00
Lennart Poettering c4e90266db
Merge pull request #16093 from yuwata/network-htb-add-settings-15213
network: tc: add several settings for HTB
2020-06-24 19:07:41 +02:00
Yu Watanabe b753e8358c test-network: add tests for ETS 2020-06-19 01:10:51 +09:00
Yu Watanabe 2ee7e54b9e test-network: add tests for HTB settings 2020-06-17 16:52:03 +09:00
Dan Streetman 6d0f38017c test: in test_bridge_configure_without_carrier, ignore setup_state
This test is failing becuase the setup state isn't reaching 'configured'
for unknown reasons; ignore the setup state for now to prevent failures
of CI until the reason can be investigated.
2020-06-13 10:19:03 +02:00
Yu Watanabe 60b316b1e9 test-network: wait 2min for the bridge being in configured state
On some CIs, it may takes more than 40 seconds.

Hopefully fixes #16105.
2020-06-09 17:19:22 +02:00
Yu Watanabe 29f69c5741 test-network: add test for IPv4AcceptLocal= 2020-06-08 13:51:50 +09:00
Frantisek Sumsal 7887e58051 test: avoid failing due to unexpected precision
After today's Arch Linux image update, there seems to be a slight change
in delay reporting which breaks some asserts in
systemd-networkd-tests.py:

Expected:
        limit 100 delay 50.0ms  10.0ms loss 20%
Current:
        limit 100 delay 50ms  10ms loss 20%
2020-06-06 18:33:35 +02:00