Commit graph

423 commits

Author SHA1 Message Date
Susant Sahani e448fcd01a test-network: re-add test for custom client identifier 2023-08-24 19:55:31 +09:00
Yu Watanabe 6ed69be98a Revert "network: DHCP6 client- Allow to send manual DUID"
This reverts commits 89e73ce86f and
543d2a4d45.

The commit assign "custom" to fixed DUID type 5. When making DUID fully
configurable, the type number should be also configurable. Also, the
fully custom DUID should be acceptable for DHCPv4.
2023-08-24 19:50:36 +09:00
Yu Watanabe 9475e23c90 network: several follow-ups for TCP-RTO setting
- rename TCPRetransmissionTimeOutSec= -> TCPRetransmissionTimeoutSec,
- refuse infinity,
- fix the input value verifier (USEC_PER_SEC -> USEC_PER_MSEC),
- use DIV_ROUND_UP() when assigning the value.

Follow-ups for 1412d4a4fe.
Closes #28898.
2023-08-22 15:02:59 +02:00
Susant Sahani 288f58c0b4 CI: network - Add test for route hoplimit 2023-08-18 15:52:14 +05:30
Luca Boccassi f9e653cfb7
Merge pull request #28870 from ssahani/rto-min-network
network: Route - allow to set TCP RTO
2023-08-18 09:23:45 +01:00
Susant Sahani 543d2a4d45 CI: network dhcp6 - Add test for custom client identifier 2023-08-17 23:52:33 +05:30
Susant Sahani 1791956e9c CI: network - Add test for route TCP RTO 2023-08-17 23:49:32 +05:30
Yu Watanabe f2bcd3245a test-network: add more tests for address properties 2023-07-31 18:15:26 +09:00
Yu Watanabe d19704cd21 test-network: add testcase for overriding Address.RouteMetric=
For issue #25843.
2023-07-31 02:31:17 +09:00
Yu Watanabe 2ede355908 test-network: add tests for several invalid neighbor settings, and overriding settings
This also makes the checks stricter.
2023-07-31 00:40:03 +09:00
Susant Sahani ab2d9e2971 CI: network - Add test for rp_filter 2023-07-28 15:05:12 +05:30
Frantisek Sumsal c1dd58b3b6 test-network: check for captive portals received via NDISC
This requires fairly recent radvd that supports sending RAs with captive
portals [0].

Also, this should hopefully provide coverage for issues like:
  - https://github.com/systemd/systemd/issues/28229
  - https://github.com/systemd/systemd/issues/28231
  - https://github.com/systemd/systemd/issues/28277

[0] https://github.com/radvd-project/radvd/pull/141
2023-07-18 11:38:58 +02:00
Yu Watanabe fc25920c94 test-network: add tests for null addresses
For issue #26113.
2023-07-07 19:11:37 +09:00
Yu Watanabe e4948bb2cd test-network: add test for static route with preferred source
This adds possible reproducer for issue #28009 (though, the issue is
highly racy, hence this may not trigger the issue reliably).
2023-07-03 16:13:49 +09:00
Yu Watanabe 856a247e19 test-network: add test for global IPv6PrivacyExtensions= setting 2023-06-29 21:58:23 +09:00
Yuxiang Zhu b67e8a4e3e
network: Add IgnoreDdontFragment= option for Fragmentation control (#28131)
From `ip-link(8)`:
> [no]ignore-df - enables/disables IPv4 DF
                      suppression on this tunnel.  Normally datagrams
                      that exceed the MTU will be fragmented; the
                      presence of the DF flag inhibits this, resulting
                      instead in an ICMP Unreachable (Fragmentation
                      Required) message.  Enabling this attribute causes
                      the DF flag to be ignored.

If this option is enabled for a GRE/GRETAP tunnel, the `DF` flag in the outer IP header
will not inherit the inner IP header's `DF` flag.

This is useful to transfer packets that exceed the MTU of the underlay
network.
2023-06-29 12:11:52 +02:00
Yu Watanabe 73d24e45f8 test-network: add tests for vlan QoS mapping 2023-05-24 11:15:44 +09: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
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 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
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
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
Topi Miettinen a4640bed74 test: testing for networkd NetLabel feature 2022-08-29 14:23:17 +09: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 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
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
Yu Watanabe ae014ecb3d test-network: add tests for KeepCarrier= for tuntap interfaces 2022-08-16 21:57:35 +09:00
Yu Watanabe 4c7d13f4b2 test-network: split test_qdisc() and test_qdisc2()
And check module availability in each tests.

This also sorts qdisc tests.
2022-08-09 19:37:50 +09:00
Yu Watanabe 5cdc7c89cb test-network: rename tun99 and tap99
The names seem to be used in AWS.

This also merges test_tun() and test_tap().
2022-08-09 19:37:49 +09:00
Yu Watanabe e4e0b239f6 test-network: add test case for #23197 2022-08-02 03:43:04 +09:00
Yu Watanabe 72c747e6d1 test-network: add a test case for IPv4LLStartAddress= 2022-07-15 04:01:56 +09:00
Yu Watanabe 589af70b87 test-network: merge two DHCPv6 client tests 2022-07-09 11:44:25 +09:00
Yu Watanabe 0730e3767d test-network: merge two more tests with test_dhcp_client_ipv4_only 2022-07-09 11:44:25 +09:00
Yu Watanabe 15519a81ac test-network: drop test_dhcp_client_ipv4_ipv6
As the test is covered by test_dhcp_client_reuse_address_as_static.
2022-07-09 11:44:25 +09:00
Yu Watanabe e81083f2d8 test-network: drop 25-dhcp-v4-server-veth-peer.network 2022-07-09 11:44:25 +09:00
Yu Watanabe b17947d9cf test-network: drop meaningless test
On DHCPv6 lease renew, the kernel do not drop static routes, and hence
we do not try to reassign them. Hence, the test is mostly meaningless.
2022-07-09 11:44:25 +09:00
Yu Watanabe 18f2638f48 test-network: merge DHCP client tests to improve performance 2022-07-08 13:04:02 +00:00
Yu Watanabe 2f0260c1bb test-network: add tests for erspan version 0 and 2 2022-06-01 04:02:49 +09:00
Yu Watanabe f7ad162879 test-network: rename one .netdev to make the file removed after the test
Follow-up for 7809cab717.
2022-04-06 18:14:45 +09:00
Yu Watanabe 0c91c7a241 network: l2tp: change create type to independent
L2TP tunnel does not have underlying interface. Let's change its type to
independent.
2022-02-27 09:36:48 +09:00
Yu Watanabe 8b49ee2dcd network: l2tp: make Local= optionally take interface name 2022-02-27 09:36:48 +09:00
Yu Watanabe ee9918ae46 test-network: add test case for activation policy for stacked netdevs
For issue #22593.
2022-02-24 16:25:05 +09:00
Yu Watanabe 3c39b9cf37 test-network: remove unused configs 2022-02-24 08:37:30 +09:00
Yu Watanabe 07b7337aff network: dhcp-pd: allow to assign the same subnet prefix to multiple interfaces
There is no reason networkd refuses that. Especially, when multiple
downstream interfaces are connected to the same network, it is natural to
assign the same subnet prefix to them.

Prompted by #22571.
2022-02-22 20:39:32 +09:00
Daan De Meyer 1e86c83308 test: Prefix all network/netdev config files used by systemd-networkd-tests.py
Let's make sure these take preference over any generic network config files shipped
by the OS (in this case specifically, mkosi).
2022-02-15 22:53:43 +00:00
Yu Watanabe b6d5dab7bb test-network: add missing tests for bridge properties 2022-02-10 18:04:34 +09:00
Santa Wiryaman 97f27f8a16 Add support for isolated parameter
Add the "Isolated" parameter in the *.network file, e.g.,

[Bridge]
Isolated=true|false

When the Isolated parameter is true, traffic coming out of this port
will only be forward to other ports whose Isolated parameter is false.

When Isolated is not specified, the port uses the kernel default
setting (false).

The "Isolated" parameter was introduced in Linux 4.19.
See man bridge(8) for more details.
But even though the kernel and bridge/iproute2 recognize the "Isolated"
parameter, systemd-networkd did not have a way to set it.
2022-02-09 17:37:37 +09:00
Yu Watanabe 7809cab717 test-network: add testcase for external tunnel 2022-02-03 11:12:34 +09:00
Yu Watanabe 6a8ab6dd1e
Merge pull request #22332 from yuwata/network-dhcp-server-dns-server-address
network: dhcp-server: allow to specify server address for DNS= or friends
2022-02-02 07:07:22 +09:00
Yu Watanabe c5f7a08739 test-network: add tests for DNS=_server_address in [DHCPServer] 2022-02-02 05:01:59 +09:00
Yu Watanabe 020483b248 test-network: set xfrm interface ID
This also unifies two tests for xfrm, and checks the output of
'ip link' command.

Fixes #22329.
2022-02-01 13:26:43 +09:00
Yu Watanabe 1e8e9730d2 test-network: add testcases for configuring SR-IOV by .link file 2022-01-19 15:00:53 +09:00
Yu Watanabe 902bbdc4b6 network: use scope link for direct unicast routes by default
Strictly speaking, this breaks the backward compatibility, but I guess
in most cases people already sets Scope=link for such routes.

This behavior matches with how 'ip route' command adds such route by
default.

Prompted by https://twitter.com/jplitza/status/1480500562391179270.
2022-01-13 22:46:52 +00:00
Yu Watanabe 14b451f20a test-network: add testcase for invalid AllowedIPs= 2021-12-31 02:31:12 +09:00
Yu Watanabe 49ad8da779 test-network: add testcase for vxlan local address auto selection 2021-12-25 15:32:06 +09:00
Yu Watanabe 7726526cc6
Merge pull request #21648 from yuwata/network-tunnel-local-automatic-address-selection
network: tunnel: automatic local address selection
2021-12-25 15:05:13 +09:00
Yu Watanabe 4862fb693d test-network: use dnsmasq for testing DHCP4-6RD 2021-12-18 10:09:07 +09:00
Yu Watanabe da7d684825 test-network: add testcase for automatic tunnel local address selection 2021-12-12 14:11:38 +09:00
Yu Watanabe 42592d0ad4 test-network: support the case that the default config files are not installed yet 2021-12-07 20:33:20 +09:00
Yu Watanabe 84cc85f983 test-network: add test for 6rd 2021-12-07 20:33:20 +09:00
Yu Watanabe a27588d4e7 network: dhcp-pd: rename [DHCPv6PrefixDelegation] -> [DHCPPrefixDelegation]
This just changes the names of settings, variables, functions, files, and so on.
No functionality is changed.

Preparation for supporting 6rd.
2021-12-07 20:30:30 +09:00
Yu Watanabe 6016f1cfbb test-network: re-arrange DHCP6-PD subnet IDs to test searching free subnet ID 2021-12-01 20:35:03 +09:00
Yu Watanabe 6c8d6bdd40 test-network: add testcases for uplink interface detection for RADV with DHCPv6-PD 2021-12-01 20:35:03 +09:00
Yu Watanabe 6387cac3f3 test-network: add tests for creating routes to wireguard's AllowedIPs= 2021-12-01 04:00:16 +09:00
Yu Watanabe 3e3b0d2a40 test-network: make udevd also generate debugging logs 2021-11-17 08:32:45 +09:00
Yu Watanabe 7a2e124b08 test-network: add testcases for Token=prefixstable with UUID 2021-11-14 13:29:44 +09:00
Yu Watanabe 0b251e8bf9 test-network: add testcases for CAKE settings 2021-11-09 10:58:44 +09:00
Yu Watanabe ab7b261663
Merge pull request #21210 from yuwata/network-dhcp-server-introduce-router-setting
network: dhcp-server: introduce Router= setting to specify router address
2021-11-03 12:41:34 +09:00
Yu Watanabe 32d97330df test-network: add a testcase for Router= setting 2021-11-03 03:15:05 +09:00
Yu Watanabe 0874be35c3 test-network: add test case for MTUBytes= for veth 2021-11-02 12:35:07 +09:00
Yu Watanabe 1ac845ffbe test-network: add more tests for [Address] section 2021-10-28 02:12:34 +09:00
Yu Watanabe 8edcd775e8 test-network: add tests for invalid [IPv6AddressLabel] section 2021-10-28 01:40:19 +09:00
Yu Watanabe 3dfa7311e2 test-network: add tests for invalid IPv6 token 2021-10-28 01:17:14 +09:00
Yu Watanabe caad88a22b test-network: add test cases for DHCPv6 prefix delegation 2021-10-26 20:43:10 +09:00
Zbigniew Jędrzejewski-Szmek 22d3cfe54c tests: add spdx license header to test unit/link/network/conf files
Those are all consumed by our parser, so they all support comments.
I was considering whether they should have a license header at all,
but in the end I decided to add it because those files are often created
by copying parts of real unit files. And if the real ones have a license,
then those might as well. It's easier to add it than to make an exception.
2021-10-18 09:04:45 +02:00
Yu Watanabe 308d01f3c4 network: do not request RAPID_COMMIT option
The option must not be included in OPTION_REQUEST option.
See the "Client ORO" field in
https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-2

This deprecates RapidCommit= setting. Note that sd-dhcp6-client always
sets the RAPID_COMMIT option in the solicit message.
2021-10-13 02:46:24 +09:00
Yu Watanabe fe2a8b3d3f test-network: add tests for Token= in [IPv6Prefix] 2021-10-07 01:24:50 +09:00
Yu Watanabe b48b6bd3b9 test-network: replace deprecated settings 2021-10-07 01:24:50 +09:00
Yu Watanabe 40971657ce test-network: add tests for duplicated address setting
Also, add more tests for PreferredLifetime=0

C.f. #20891.
2021-10-04 18:26:35 +09:00
Yu Watanabe b06469a66c test-network: add tests for KeepMaster= 2021-09-04 08:15:30 +09:00
Yu Watanabe ab47f96041 test-network: add more testcases for *Allow/DenyList= 2021-08-23 20:37:36 +09:00
Yu Watanabe 180c5116b3 test-network: add testcases that gateway address is IPv6 link local 2021-08-22 15:35:22 +09:00
Maxime de Roucy d419ef0243 network: add address label on dhcpv4
Fixes: #13967
2021-08-17 02:40:18 +09:00
Yu Watanabe af0d4e6ef5 test-network: test static lease outside of pool 2021-08-11 16:43:26 +09:00
Luca Boccassi 32a2ee2bb4
Merge pull request #20375 from yuwata/network-bridge-vlan-issue-20373
network: fix bridge and openvswitch issues
2021-08-05 11:18:03 +01:00
Yu Watanabe 801cf85935
Merge pull request #20377 from yuwata/network-bridge-fdb-20305
network: always append new bridge FDB entries
2021-08-05 02:44:24 +09:00
Yu Watanabe 988b0660aa test-network: add a test case for issue #20373 2021-08-04 23:22:20 +09:00
Yu Watanabe 4a906586f8 test-network: add a testcase for UplinkInterface= in [IPv6SendRA] 2021-08-04 22:21:00 +09:00
Yu Watanabe cca07d910a test-network: add a testcase for vxlan with IPv6 local address 2021-08-04 18:33:23 +09:00