Commit graph

831 commits

Author SHA1 Message Date
Yu Watanabe d5e6df24bd
Merge pull request #31498 from ssahani/bond
netdev: bond - add support for peer_notif_delay
2024-03-01 12:45:52 +09:00
Yu Watanabe d6360819a7 test-network: add more test cases for LLDP 2024-03-01 09:40:26 +09:00
Luca Boccassi 0cad991c4c
Merge pull request #31293 from ragazenta/netdev_rps
udevd: Add ReceivePacketSteeringCPUMask for systemd.link
2024-02-28 13:37:28 +00:00
Susant Sahani de736b9658 test-network: Add test for bond peer_notif_delay 2024-02-28 17:34:54 +05:30
Renjaya Raga Zenta a6f5673c99 test-network: Add test for rps_cpu_mask option 2024-02-28 11:37:18 +07:00
Yu Watanabe c4047829bb test-network: fix typo
Follow-up for a663ddc04e.
2024-02-28 11:44:20 +09:00
Yu Watanabe 3976c43092 network: introduce per-interface IP forwarding settings
This deprecates IPForward= setting, which unconditionally controled
the global setting, even though it is a setting in .network file.

Instead, this introduces new IPv4Forwarding= and IPv6Forwarding=
settings both in .network and networkd.conf.
If these settings are specified in a .network file, then the
per-interface forwarding setting will be configured.
If specified in networkd.conf, then the global IP forwarding setting will
be configured.

Closes #30648.
2024-02-22 19:24:12 +00:00
Susant Sahani 2b98febe9d test-network: add test for macvlan BroadcastQueueMulticastLength= and BroadcastQueueThreashold= 2024-02-22 09:46:55 +09:00
Yu Watanabe 0183d48ddb test-network: use assertIn() 2024-02-22 09:46:45 +09:00
Yu Watanabe 3b677c6f94 test-network: add one more test case for DHCP prefix delegation
For issue #31349.
2024-02-17 11:48:25 +00:00
Yu Watanabe ab06b74fd3 test-network: split test_dhcp6pd() into small pieces 2024-02-17 11:48:25 +00:00
Susant Sahani d2d0a8d45d test-network: Add test for bond arp_missed_max option 2024-02-16 15:03:58 +05:30
Yu Watanabe 6854322483 test-network: show interface status again when wait-online failed
Fixes a bug in 10d670a3c1.

This also makes wait_online() show a short message when a requested
interface not found.
2024-02-15 00:37:03 +00:00
Yu Watanabe 29fbbb1389 test-network: add test for advertised hop limit
For issue #28437.
2024-02-15 00:43:12 +09:00
Yu Watanabe 9fbab82bef test-network: add test case for removing conflicting routes
For issue #28439.
2024-02-15 00:43:12 +09:00
Yu Watanabe e3cc2bd9c6 test-network: drop unnecessary IPv6SendRA=yes setting 2024-02-15 00:43:12 +09:00
Yu Watanabe 95e1fbbac4 test-network: allow to specify multiple interfaces to wait_online() without square bracket 2024-02-15 00:42:43 +09:00
Yu Watanabe a89fd4a046 Revert "test: temporarily disable test_sysctl"
This reverts commit 8ed7800d7b.
2024-02-12 01:14:55 +09:00
Yu Watanabe 9e95c0e495
Merge pull request #31172 from yuwata/network-bond-port
network: do not bring down bonding port on reconfigure
2024-02-09 17:32:29 +09:00
Yu Watanabe 4bc771d061 test: drop unnecessary sleep
Now, 'Reload' dbus method is synchronous. It is not necessary to wait
for link enter configuring state.
2024-02-09 14:25:54 +09:00
Yu Watanabe 2bb1d3c108 test-network: add test case for issue #31165 2024-02-09 14:15:17 +09:00
Yu Watanabe 7dc431839e network/dhcp4: disable IPv6OnlyMode= by default
As explained in #30891, IPv6OnlyMode= should be enabled with 464XLAT
support, but we do not support it yet. Let's disable by default.

Fixes #30891.
2024-02-07 23:30:17 +00:00
Yu Watanabe 68676af60d test-network: fix typo
Follow-up for d4c8de21a0.
2024-02-02 09:29:14 +09:00
Yu Watanabe b5edf3a996 test-network: check if networkd forgets routes silently removed by the kernel 2024-01-25 16:43:44 +09:00
Matt Muggeridge d4c8de21a0 IPv6 RA: Support the Retrans Timer field (IPv6 Conformance Test: v6LC.2.1.5)
The RA's Retransmission Timer field was being ignored. This resolves the IPv6
Core Conformance test, v6LC.2.1.5 [1].

Retransmission Timer is a 32-bit unsigned integer. The time, in milliseconds,
between retransmitted Neighbor Solicitation messages. Used by the Address
Resolution and Neighbor Unreachability Detection (NUD) algorithm.

Support setting a default value for the neighbour retransmission timer value with:

    [Network]
    IPv6RetransmissionTimeSec=<int>

By default, upon receiving a Router Advertisement with the Retransmission Timer
field set to a non-zero value, it will update the kernel's retransmit timer value.
To disable this behaviour, configure the UseIPv6RetransmissionTime= under the
[IPv6AcceptRA] section.

    [IPv6AcceptRA]
    UseIPv6RetransmissionTime=<bool>

RFC4861: Neighbor Discovery in IPv6
  * Section 4.2 RA Message Format.
  * Section 6.3.4 Processing Received Router Advertisements

A Router Advertisement field (e.g., Cur Hop Limit, Reachable Time,
and Retrans Timer) may contain a value denoting that it is
unspecified. In such cases, the parameter should be ignored and the
host should continue using whatever value it is already using. In
particular, a host MUST NOT interpret the unspecified value as
meaning change back to the default value that was in use before the
first Router Advertisement was received.

The RetransTimer variable SHOULD be copied from the Retrans Timer
field, if the received value is non-zero.

References
[1] IPv6 Core Conformance Spec (PDF)
2024-01-23 03:18:01 +09:00
Nick Cao 4be1fc8443 network: Add L3MasterDevice= into routing policy 2024-01-19 00:17:50 +00:00
Yu Watanabe 7155ad9532 test-network: test the default required operational state for CAN devices 2024-01-17 04:05:43 +09:00
Yu Watanabe f9b5c27645 test-network: add test case for removal of nexthop that is a member of a group nexthop 2024-01-16 12:48:50 +09:00
Yu Watanabe a663ddc04e test-network: add simple test case for DHCP relay on bridge interface
For issue #30763.
2024-01-15 10:53:07 +00:00
Yu Watanabe 6d1cea7bc6 test-network: try to flip interface state frequently 2024-01-15 15:46:33 +09:00
Yu Watanabe 4db8ccbb59 wireguard: verify routes configured in .netdev file
Then, scope and friends are correctly adjusted, and the behavior should
be matched when the same route is configured in .network file.
2024-01-13 10:10:32 +09:00
Luca Boccassi 3df2b718b2
Merge pull request #30716 from yuwata/network-cancel-request
network: also remove configuration on cancelling request
2024-01-10 19:33:16 +00:00
Yu Watanabe 9540f8e216 test-network: add test case for MACAddress=none in .netdev and MACAddressPolicy=none in .link
Prompted by #30813.
2024-01-10 12:07:23 +01:00
Mike Yuan fa724cd52c
networkd/wireguard: support network.wireguard.* credentials
Closes #26702
2024-01-09 15:25:30 +08:00
Yu Watanabe 6b07675d81 test-network: do not call networkctl if networkd is in failed state
Otherwise, networkd may be restarted by DBus and we may get wrong
results.
2024-01-06 14:48:18 +09:00
Yu Watanabe 10d670a3c1 test-network: introduce networkctl() and friends 2024-01-06 14:48:15 +09:00
Yu Watanabe 032fd10de8 test-network: use read_networkd_log() at one more place 2024-01-06 12:46:00 +09:00
Yu Watanabe bd581438a1 test-network: sync journal before read
Otherwise, test cases that check journal entries, e.g. test_unit_file()
may fail.
2024-01-06 12:45:59 +09:00
Yu Watanabe 2ec0e95eb7 test-network: add test for removal of nexthops that we do not receive reply from the kernel 2024-01-05 19:18:58 +09:00
Yu Watanabe 78265b5b4a test-network: add test case about replacing nexthop 2024-01-05 04:00:16 +09:00
Yu Watanabe 9362f7d5b5 test-network: merge three tests for neighbor
To speed up tests.
2024-01-05 04:00:16 +09:00
Yu Watanabe dc60ac2960 test-network: show monotonic timestamp and drop hopstname from logs 2024-01-05 04:00:16 +09:00
Raito Bezarius b49595503d networkd: support proxy_arp_pvlan sysctl
The proxy ARP private VLAN sysctl is useful for VLAN aggregation, see
https://sysctl-explorer.net/net/ipv4/proxy_arp_pvlan/ for details.
2023-12-24 03:40:03 +09:00
Yu Watanabe 3a2ef59d2e test-network: add test case of an empty string assignment for Address= 2023-12-21 04:13:19 +09:00
Yu Watanabe 67150a7bd4 test-network: use the main .network file
These tests are not interested in most addresses specified in the .network file.
As 10-many-address.conf drop-in config for the .network file contains so
many addresses, hopefully this improves test performance.
2023-12-21 04:10:19 +09:00
Yu Watanabe b993e7e72e network: also log drop-in config files
We have already show used drop-in config files in networkctl, but
also showing that in log may be useful.

Closes #30483.
2023-12-21 03:37:17 +09:00
Frantisek Sumsal 6277e47127
Merge pull request #30508 from topimiettinen/fix-flaky-test-address-static
test-network: fix racy test for address_static
2023-12-18 14:43:26 +00:00
Topi Miettinen 0e808f622b test-network: accept kernel versions like 1.2.3+ (self-built) 2023-12-18 14:40:21 +00:00
Topi Miettinen f432aa9083
Revert "test: temporarily skip checking NFT sets in test_address_static"
This reverts commit e4a80de119.
2023-12-17 18:01:42 +02:00
Topi Miettinen 1ce2ffac6c
test-network: fix racy test for address_static
NFT sets must be installed before starting networkd, otherwise some sets may be
installed too late.

Closes #30427
2023-12-17 17:59:53 +02:00
Yu Watanabe 41231f2697 test-network: add test for ManageForeignNextHops=no 2023-12-13 00:02:36 +09:00
Yu Watanabe e7660b9aff test-network: reduce indent for verification 2023-12-12 23:51:10 +09:00
Yu Watanabe 77633317ce test-network: drop redundant call of tearDown() 2023-12-12 23:51:10 +09:00
Frantisek Sumsal e4a80de119 test: temporarily skip checking NFT sets in test_address_static
Until https://github.com/systemd/systemd/issues/30427 is resolved.
2023-12-12 12:25:47 +01:00
Frantisek Sumsal 8ed7800d7b test: temporarily disable test_sysctl
Until https://github.com/systemd/systemd/issues/30056 is resolved.
2023-12-12 12:20:41 +01:00
Yu Watanabe 2527b725ba
Merge pull request #30156 from yuwata/network-mtu
network: accept arbitrary size of MTU in .network
2023-12-12 19:03:21 +09:00
Luca Boccassi 7aea3cf8c2
Merge pull request #30404 from yuwata/network-peer
network/route: fix reachability check when peer address is specified
2023-12-10 14:13:37 +00:00
Yu Watanabe 7618fd06ef test-network: check if networkd exits cleanly 2023-12-10 14:40:09 +09:00
Yu Watanabe 5e46ca9890 test-network: add test case for issue #30403 2023-12-10 14:04:28 +09:00
Yu Watanabe 470a329d98 test-network: add test for small MTU for vcan
Prompted by https://github.com/systemd/systemd/issues/30140#issuecomment-1837973580.
2023-12-08 10:47:42 +09:00
Zbigniew Jędrzejewski-Szmek bfa95c369a
Merge pull request #29987 from yuwata/network-bridge-vlan
network: remove unnecessary bridge vlan IDs
2023-12-06 22:25:42 +01:00
Yu Watanabe b65c539088 test-network: add tests for [DHCPv4] AllowList= and DenyList=
We have not tested if the settings actually filter DHCP servers.
Let's add a test case for the settings.

Note, the .network file used here has been unused since
0730e3767d. So, we can freely reuse it
without changing other test cases.

Closes #30107.
2023-11-22 05:37:04 +09:00
Yu Watanabe 60f4b2c560 test-network: extend tests for [BridgeVLAN] settings 2023-11-13 03:58:46 +09:00
Yu Watanabe 1805e2cb05 test-network: add test case for issue #29979 2023-11-11 03:57:59 +09:00
Yu Watanabe 3aa47694d1 test-network: verify json format about DHCPv6 client status 2023-11-09 01:31:17 +09:00
Yu Watanabe d377949085 test-network: test MultiPathRoute= via another interface
Prompted by https://github.com/systemd/systemd/pull/14194#issuecomment-1795489641.
2023-11-06 20:59:49 +00:00
Frantisek Sumsal 33b0e0c09a test-network: copy rules from source & build trees if needed
When running with --build-dir= we need to copy over udev rules from
$BUILD_DIR/udev.d/ and $SOURCE_TREE/udev.d/ to make stuff work as
expected.
2023-10-30 21:13:00 +00:00
Ronan Pigott 2beecc7077 test-network: add dhcp rapid commit test 2023-10-27 10:55:55 -07:00
Yu Watanabe dd59a609be test-network: suppress too much outputs of state file
Follow-up for 0f9efffaeb.
2023-10-26 12:26:19 +09:00
Yu Watanabe 0f9efffaeb test-network: wait for the state file being updated
Also, sync state files before read.

Addresses the first issue in #29678.
2023-10-24 23:22:27 +09:00
Yu Watanabe cb0e97e7de test-network: drop unnecessary explicit stop of dnsmasq 2023-10-12 18:34:20 +09:00
Yu Watanabe aa7336f1d3 test-network: add test case for renewing DHCP lease 2023-10-12 18:33:52 +09:00
Yu Watanabe 46f2eb517c test-network: add tests for DHCP IPv6 only mode
For [DHCPv4] IPv6OnlyMode= and [DHCPServer] IPv6OnlyPreferredSec=.
2023-10-11 21:42:13 +09:00
Luca Boccassi 00dd4e78f6
Merge pull request #29495 from yuwata/network-manager-state-file
network: fixlets for manager state file
2023-10-08 22:46:44 +01:00
Yu Watanabe 2d7ca6b45d test-network: add test for DHCPv6 information requesting mode
For issue #28566.
2023-10-08 16:31:59 +09:00
Yu Watanabe 34290c6aa9 test-network: test for NTP servers by DHCPv6 protocol
For issue #29148.
2023-10-08 15:45:35 +09:00
Yu Watanabe 8fc7e073e3 test-network: extend testcase for tbf
For issue #29485.
2023-10-07 21:35:16 +09:00
Yu Watanabe e081ffc114 test-network: move get_dbus_dhcp_client_state() and friends to global 2023-10-06 10:16:27 +01:00
Yu Watanabe 6b524d70e3 test-network: add tests for [DHCPv4] RequestAddress= setting 2023-10-05 11:14:29 +09:00
Yu Watanabe b5c8f47102 test-network: test SIP servers obtained by DHCP
For issue #29145.
2023-10-04 08:41:26 +02:00
Yu Watanabe fcdd21ec6a tree-wide: fix typo 2023-10-04 08:58:10 +09:00
Yu Watanabe d5adff70c0 test-network: add test for multiple IPv6 null addresses
This also merges test_address_null() into test_address_static().
2023-09-18 10:22:08 +09:00
Yu Watanabe 47f1ce1677 test-network: add testcase for [DHCPServer] ServerAddress= with null address 2023-09-08 20:03:40 +09:00
Susant Sahani 681007ac20 test-network: Add test for PREF64 2023-09-06 15:53:11 +09:00
Yu Watanabe a832087979
Merge pull request #29023 from pelaufer/dhcp-prefix-dbus
Add dhcp client prefix lease information to networkd json output
2023-09-05 00:16:19 +09:00
pelaufer e1ef777192 Adding tests for dhcp client and dhcp6 client dbus state interface 2023-09-02 14:53:23 -06:00
pelaufer 8fb6320e4b Add dhcp client prefix lease information to networkd json output 2023-09-02 13:45:03 -06:00
Yu Watanabe 1d4c874d3c
Merge pull request #24570 from topimiettinen/nft-sets-v2
network: firewall integration with NFT sets
2023-09-01 20:13:39 +09:00
Topi Miettinen c742d7e801
test: testing for networkd NFTSet feature 2023-08-26 21:37:35 +03:00
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
Frantisek Sumsal 79f902eb09 Add .pylintrc to globally suppress warnings we don't really care about
Also, drop the respective disable directives from existing files.
2023-08-10 18:13:29 +02:00
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