1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
Commit Graph

700 Commits

Author SHA1 Message Date
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
Luca Boccassi
fc3fe92bc8
Merge pull request #28508 from yuwata/network-next-dhcp4
network: several cleanups and fixes for DHCPv4 client
2023-07-29 12:15:38 +01:00
Susant Sahani
ab2d9e2971 CI: network - Add test for rp_filter 2023-07-28 15:05:12 +05:30
Yu Watanabe
4001653ddb network/dhcp4: always honor specified gateway address
Follow-up for 77451f654a.

Now, gateway for routes to DNS or NTP servers should be correctly picked,
hence it is not necessary to adjust the gateway address in
dhcp4_request_route_auto() again.

Also, similar for classless static routes, let's always honor
gateway address specified in (non-classless) static routes.
2023-07-28 05:47:11 +09:00
Yu Watanabe
0ce86f5eeb network/dhcp4: always find suitable gateway for destination address
And if not found, refuse to configure the route.

If a DHCP server provides classless static or static routes, then we
should use the gateway for accessing a node in the range specified in
the route. E.g. if a DHCP server provides the default gateway is
192.168.0.1, and classless static route for 8.0.0.0/8 with gateway
192.168.0.2, then we should access 8.8.8.8 through 192.168.0.2 rather
than 192.168.0.1, but should use 192.168.0.1 for 9.9.9.9.

Fixes #28358.
2023-07-28 05:45:51 +09:00
Frantisek Sumsal
8bdece7479 network: fix fetching link properties
This fixes regression introduced in 5a0c810462 with which all requests
for link properties ended up with EINVAL as we kept hitting
the signature_is_single() assert in sd_bus_get_property().
2023-07-18 23:08:19 +02:00
Frantisek Sumsal
7e107bc31f test-network: probe a couple of uncovered networkctl codepaths 2023-07-18 21:42:39 +02:00
Frantisek Sumsal
aca99a3a38 test-network: validate JSON where applicable 2023-07-18 21:42:39 +02:00
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
Frantisek Sumsal
5a000cd46f test-network: correctly support running systemd-udevd from the build dir
We create the udevadm -> systemd-udevd symlink during the install phase,
so it doesn't exist in the just compiled tree. This worked in CI since
the symlink is manually created there post-build.
2023-07-17 12:56: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
86f6760038 test-network: add one more testcase for DHCPv4 classless route
For issue #28280.
2023-07-07 06:57:08 +09:00
Yu Watanabe
62eaf8d039 test-network: drop ExecReload= in networkd.service and udevd.service
Follow-up for 0e07cdb0e7 and
f84331539d.
2023-07-06 14:55:58 +09:00
Ronan Pigott
1219391c9f test-network: add test for an invalid captive portal uri
This could probably be extended to include many more invalid uri
2023-07-03 13:47:12 -07: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
7e30527806 test-network: check route more strictly 2023-07-03 16:06:17 +09:00
Yu Watanabe
86c2a76e09
Merge pull request #28132 from rpigott/dhcp-captive-portal
Implement RFC8910: captive portal dhcp options
2023-07-03 14:51:56 +09:00
Ronan Pigott
dbe960f07f test-network: add tests for captive portal dhcp options 2023-07-02 01:13:43 -07:00
Frantisek Sumsal
a5e478b24c test: fix test_vxlan with the latest iproute2
Some options were renamed and some options with default values are not
shown unless -d(etails) is repeated.

See: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=1215e9d3862387353d8672296cb4c6c16e8cbb72
2023-06-30 17:33:40 +00: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
Henrik Holst
cf4dbd84ac
network: make degraded-carrier bond/bridge as routable (#27776)
This makes a bond or bridge interface in the degraded-carrier state but has a routable address
handled as routable operational state.

If the carrier is degraded but the address state is routable then the operational state should be
seen as routable and not degraded because that may be the case for bonds if some of the links are down,
but when that happens the bond as whole is still routable.

This also makes operational state to degraded if address state is degraded even if the link state is
degraded-carrier.

Fixes #22713.
2023-06-15 13:32:10 +09:00
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