summaryrefslogtreecommitdiffstats
path: root/test/test-network (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test-network: actually check metric and preferenceYu Watanabe9 days1-2/+2
| | | | | | | | | Otherwise, nexthop ID may contain e.g. 300, then === AssertionError: '300' unexpectedly found in 'default nhid 3860882700 via fe80::1034:56ff:fe78:9a99 proto ra metric 512 expires 1798sec pref high\n default nhid 2639230080 via fe80::1034:56ff:fe78:9a98 proto ra metric 2048 expires 1798sec pref low' ===
* test-network: add test case for IPv6 Core Conformance test v6LC.2.2.23Yu Watanabe11 days1-0/+18
|
* test-network: split out check_router_preference() from test_router_preference()Yu Watanabe11 days3-90/+32
| | | | | This also drop high2.network and low2.network, and edit high.network and low.network during the test.
* network/ndisc: fix coalescing of ndisc routes when multiple router exists ↵Yu Watanabe2024-11-141-21/+81
|\ | | | | | | | | (#35119) Fixes #33470.
| * network/ndisc: dynamically configure nexthops when routes with gateway are ↵Yu Watanabe2024-11-141-21/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | requested Previously, when multiple routers send RAs with the same preference, then the kernel merges routes with the same gateway address: === default proto ra metric 1024 expires 595sec pref medium nexthop via fe80::200:10ff:fe10:1060 dev enp0s9 weight 1 nexthop via fe80::200:10ff:fe10:1061 dev enp0s9 weight 1 === This causes IPv6 Conformance Test v6LC.2.2.11 failure, as reported in #33470. To avoid the coalescing issue, we can use nexthop, as suggested by Ido Schimmel: https://lore.kernel.org/netdev/ZytjEINNRmtpadr_@shredder/ > BTW, you can avoid the coalescing problem by using the nexthop API. > # ip nexthop add id 1 via fe80::200:10ff:fe10:1060 dev enp0s9 > # ip -6 route add default nhid 1 expires 600 proto ra > # ip nexthop add id 2 via fe80::200:10ff:fe10:1061 dev enp0s9 > # ip -6 route append default nhid 2 expires 600 proto ra > # ip -6 route > fe80::/64 dev enp0s9 proto kernel metric 256 pref medium > default nhid 1 via fe80::200:10ff:fe10:1060 dev enp0s9 proto ra metric 1024 expires 563sec pref medium > default nhid 2 via fe80::200:10ff:fe10:1061 dev enp0s9 proto ra metric 1024 expires 594sec pref medium Fixes #33470. Suggested-by: Ido Schimmel <idosch@idosch.org>
* | network/netdev: follow-ups for reloading .netdev files (#34979)Luca Boccassi2024-11-141-5/+108
|\ \ | |/ |/| Follow-ups for #34909.
| * test-network: add tests for reloading .netdev files for independent netdevsYu Watanabe2024-11-141-5/+108
| |
* | test-network: update KeepConfiguration=dhcp -> dynamicYu Watanabe2024-11-143-7/+7
|/
* test-network: several cleanupsYu Watanabe2024-11-121-46/+43
| | | | | | | | - fix verifiers in test_router_preference() to make them actually check if unnecessary routes are removed, - stop radv in test_ndisc_vs_static_route() before checking if the static route is preserved even when the router sends a RA with zero lifetime, - make verifiers in NetworkdIPv6PrefixTests stricter.
* test-network: add test case for issue #35047Yu Watanabe2024-11-114-0/+60
|
* network/nexthop: do not remove depending nexthops when a nexthop is removedYu Watanabe2024-11-111-3/+10
| | | | | Previously, when a nexthop is removed, depending nexthops were removed, but that's not necessary, as the kernel keeps them, at least with v6.11.
* test-network: reconfigure interface cleanly to drop previous DHCP lease and ↵Yu Watanabe2024-11-111-6/+12
| | | | | | | | | | | | | | | | friends Follow-up for 451c2baf30f50b95d73e648058c7c2348dbf0c31. With the commits, reloading .network files does not release previously acquired DHCP lease and friends if possible. On graceful reconfigure triggered by the reload, the interface may acquire a new DHCPv4 lease earlier than DHCPv6 lease. In that case, the check will fail as it is done with the new DHCPv4 lease and old DHCPv6 lease, which does not contain any IPv6 DNS servers or so. So, when switching from no -> yes, we need to wait a new lease with DNS servers or so. To achieve that, we need to clean reconfigure the interface.
* network: reset 'configured' flags even if we keep DHCP lease and friends on ↵Yu Watanabe2024-11-111-1/+0
| | | | | | | | | | | | | | | | | reconfigure Follow-up for 451c2baf30f50b95d73e648058c7c2348dbf0c31. With the commits, reloading .network files does not release previously acquired DHCP lease and friends if possible. If previously a DHCP client was configured as not requesting DNS servers or so, then the previously acquired lease might not contain any DNS servers. In that case, if the new .network file enables UseDNS=, then the interface should enter the configured state after a new lease is acquired. To achieve that, we need to reset the flags. With this change, the workaround applied to the test by the commit 451c2baf30f50b95d73e648058c7c2348dbf0c31 can be dropped.
* networkd: add possibility to specify MulticastIGMPVersionMichele Dionisio2024-11-062-0/+2
|
* network: keep dynamic configurations as possible as we can on reconfigureYu Watanabe2024-11-051-0/+1
| | | | | | | | | | E.g. when a .network file is updated, but DHCP setting is unchanged, it is not necessary to drop acquired DHCP lease. So, let's not stop DHCP client and friends in link_reconfigure_impl(), but stop them later when we know they are not necessary anymore. Still DHCP clients and friends are stopped and leases are dropped when the explicit reconfiguration is requested
* test-network: add test case for tunnel Local=dhcp4Yu Watanabe2024-10-314-2/+26
| | | | For issue #24854.
* test-network: test for reload of .netdev file of stacked netdevYu Watanabe2024-10-301-10/+214
| | | | For issue #9627, #27177, and #34907.
* network/tunnel: reuse existing 6rd sit tunnel (#34938)Yu Watanabe2024-10-301-9/+15
|\ | | | | split-out of #34909.
| * test-network: add test case for reuse of existing 6rd SIT tunnelYu Watanabe2024-10-301-9/+15
| |
* | test-network: add test for DHCPv4 address removal on stopYu Watanabe2024-10-301-0/+19
|/ | | | For issue #34837.
* test-network: add DHCPv6 DNR testRonan Pigott2024-10-211-1/+33
| | | | Same as the DHCPv4 test.
* test-network: add test for DHCPv4 DNRRonan Pigott2024-10-211-0/+69
| | | | | This will test that networkd/resolved can understand the V4_DNR DHCP option.
* test-network: add test for sysctl watchMatteo Croce2024-09-111-0/+32
| | | | | Add a NetworkdSysctlTest class which ensures that networkd correctly complains when a sysctl file it's handling has been changed externally.
* test-network: add test more cases for assigned units for each interfaceYu Watanabe2024-09-101-0/+135
|
* network: Add support for mq qdiscDaan De Meyer2024-09-042-0/+21
|
* network: Add support for multiq qdiscDaan De Meyer2024-09-042-0/+22
|
* networkd: Replace existing objects instead of doing nothing if they existDaan De Meyer2024-09-021-0/+11
| | | | | | | | | | Currently, if for example a traffic control object already exist, networkd will silently do nothing, even if the settings in the network file for the traffic control object have changed. Let's instead replace the object if it already exists so that new settings from the network file are applied as expected. Fixes #31226
* test-network: use the same MTU bytes for veth interfacesYu Watanabe2024-08-311-0/+2
| | | | Hopefully fixes #34204.
* test-network: check one more rule we configureYu Watanabe2024-08-231-0/+4
|
* test-network: also test routing policy rules are configured as expected ↵Yu Watanabe2024-08-211-1/+15
| | | | | | after reconfiguration For issue #34068.
* test-network: find routing policy rule by priorityYu Watanabe2024-08-211-1/+5
| | | | | | | | We usually configure a test rule with a unique priority. Hence, finding rule by priority reduces the lines of output, and we can debug easily. Also print short comments on check. That's helpful when the check is called several times.
* Merge pull request #34049 from yuwata/network-routing-policy-ruleLuca Boccassi2024-08-213-33/+84
|\ | | | | network: further rework for routing policy rule
| * test-network: add test for ManageForeignRoutingPolicyRules=Yu Watanabe2024-08-202-1/+40
| |
| * test-network: add tests for Type=table, goto, and nopYu Watanabe2024-08-202-32/+44
| |
| * test-network: do not pass '[detached]' to 'ip rule del'Yu Watanabe2024-08-201-1/+1
| | | | | | | | | | | | | | | | That indicates the interface name in 'iif' or 'oif' cannot be resolved when 'ip rule' command is invoked. That's natural when networkd fail to remove rule but the corresponding interface is already removed. To make not the residual rules interfere subsequent test cases, let's ignore the flag and actually remove unwanted rules.
* | network/address-label: allow to configure IPv6 address label in networkd.confYu Watanabe2024-08-202-1/+8
|/ | | | Closes #23159.
* test-network: make kernel send NA with router flagYu Watanabe2024-08-201-0/+1
| | | | | | | | | | | | | If the router interface send NA without router flag, client interface will drop SLAAC addresses. To make the router interface send NA with router flag, IPv6 forwarding needs to be enabled. === client: NDISC: Received Neighbor Advertisement from fe80::1034:56ff:fe78:9a99: Router=no, Solicited=yes, Override=no client: NDISC: Invoking callback for 'neighbor' event. client: Removing NDisc route (configured): dst: 2002:da8:1:99::/64, src: n/a, gw: n/a, prefsrc: n/a, table: main(254), priority: 1024, proto: ra, scope: global, type: unicast, flags: n/a client: Removing NDisc route (configured): dst: n/a, src: n/a, gw: fe80::1034:56ff:fe78:9a99, prefsrc: n/a, table: main(254), priority: 1024, proto: ra, scope: global, type: unicast, flags: n/a client: Removing NDisc address (configured): 2002:da8:1:99:1034:56ff:fe78:9a00/64 (valid for 23h 59min 58s, preferred for 3h 59min 58s), flags: manage-temporary-address,no-prefixroute, scope: global ===
* network/wireguard: introduce [WireGuardPeer] PublicKeyFile=Yu Watanabe2024-08-163-2/+3
| | | | | | Similar to PresharedKeyFile=, but for public key. Closes #34012.
* test-network: Add test for BareUDP srcportminSusant Sahani2024-08-142-0/+2
|
* test-network: add test case for UnassignedSubnetPolicy=Yu Watanabe2024-08-053-0/+12
|
* Added support for L2 BridgeMDB entries (#32894)jauge-technica2024-08-022-0/+8
| | | * Added support for L2 BridgeMDB entries
* test-network: add test case for preferred source with peerYu Watanabe2024-07-302-0/+13
| | | | For issue #31950.
* test: systemd-networkd-tests: add fdb learned testsGregor Herburger2024-07-222-0/+5
| | | | | | | Add a test for the new bridge netlink attributes IFLA_BR_FDB_N_LEARNED and IFLA_BR_FDB_MAX_LEARNED. Signed-off-by: Gregor Herburger <gregor.herburger@ew.tq-group.com>
* systemd-networkd-tests: Skip tests requiring dhcpd if it is not availableDaan De Meyer2024-07-151-0/+3
| | | | | | dhcpd is not available on CentOS Stream 10 See https://github.com/systemd/systemd/issues/33717
* test-network: check if static routes not overridden by NDisc routesYu Watanabe2024-06-242-0/+38
|
* test-network: mention that the captive portal option is supported since v2.20Yu Watanabe2024-06-171-0/+2
| | | | The current latest release is v2.19, hence the test is typically skipped now.
* test-network: wait a while for addresses to be droppedYu Watanabe2024-06-111-11/+5
| | | | | | | | | | | | | | | | | | | | | | Hopefully fixes the following failure: ``` ====================================================================== FAIL: test_ipv6_token_prefixstable (__main__.NetworkdRATests.test_ipv6_token_prefixstable) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/systemd/tests/testdata/test-network/systemd-networkd-tests.py", line 5705, in test_ipv6_token_prefixstable self.assertNotIn('2002:da8:1:0:b47e:7975:fc7a:7d6e/64', output) # the 1st prefixstable ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: '2002:da8:1:0:b47e:7975:fc7a:7d6e/64' unexpectedly found in '19: veth99@veth-peer: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000\n inet6 2002:da8:1:0:b47e:7975:fc7a:7d6e/64 scope global tentative dynamic mngtmpaddr noprefixroute \n valid_lft 2100sec preferred_lft 1000sec\n inet6 2002:da8:1:0:da5d:e50a:43fd:5d0f/64 scope global dynamic mngtmpaddr noprefixroute \n valid_lft 2100sec preferred_lft 1000sec\n inet6 fe80::1034:56ff:fe78:9abc/64 scope link proto kernel_ll \n valid_lft forever preferred_lft forever' ---------------------------------------------------------------------- ```
* network/ndisc: use router lifetime as one for redirect routeYu Watanabe2024-06-061-6/+4
| | | | | | | | | | | | | | | | | | | | | | Previously, we did not set lifetime for redirect route, and redirect routes were removed only when received a RA from the target address. Thus, routes that redirect on-link addresses were never removed. RFCs mention nothing about the lifetime of redirection. But the previous implementation does not pass the IPv6 Core Conformance Tests. This makes - remember all received RAs and manage them by the sender address (previously, remembered only one with the highest preference), - then use the router lifetime as one for redirect route, - remove redirect route also when the router corresponds to the sender address is dropped (previously, considered only target address). Note, even if we recieve a new RA, we do not update existing redirect routes. The lifetime of the redirect route is updated only when a new Redirect message is received. Closes #32527.
* test-network: introduce a .network file to protect existing interfacesYu Watanabe2024-06-031-0/+13
|
* test-network: show PID and Invocation ID of networkdYu Watanabe2024-06-031-0/+10
| | | | | Then, we can easily find relevant journal entry on failure. This is especially useful when the test is running with --no-journal.