Yu Watanabe
2616b5285f
test-network: introduce dump_dnsmasq_log_file()
2021-12-18 10:09:07 +09:00
Yu Watanabe
4862fb693d
test-network: use dnsmasq for testing DHCP4-6RD
2021-12-18 10:09:07 +09:00
Yu Watanabe
f56af3b4c8
test-network: use --bind-interfaces option for dnsmasq
...
Also make the interface name and router address configurable.
2021-12-18 10:09:07 +09:00
Yu Watanabe
fe87807eaa
network: dhcp-pd: do not stack 6rd sit tunnel
2021-12-18 10:09:07 +09:00
Yu Watanabe
2347b6b94e
test-network: wait for veth99 being configured
...
As the address, which should be kept, may not be just removed yet.
Let's check that the address is actually kept.
2021-12-17 00:14:30 +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
ab0c82d9f7
network: dhcp6pd: assign addresses in the delegated prefix instead of a subnet prefix /64 on upstream interface
2021-12-07 19:46:37 +09:00
Yu Watanabe
45aa0e841b
network,udev: do not adjust local assignment bit of specified MAC address
...
People often assigns the MAC address of the enslaved interface to e.g.
bridge interface. So, the local assignment bit should not be adjusted.
Fixes #21649 .
2021-12-07 15:01:04 +09:00
Yu Watanabe
133f65ef2c
test-network: start dhcpd after address is assigned
2021-12-06 19:18:55 +09:00
Yu Watanabe
5f7f1f824f
test-network: make start_isc_dhcpd() take IP version
2021-12-06 19:18:55 +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
94f0bd624b
test-network: add more basic tests for network json formats
2021-11-30 10:03:51 +09:00
Yu Watanabe
007899f43e
network/netdev: verify specified MAC address
...
Drop multicast bit and set local bit of the specified MAC address.
This also makes failure in generating persistent MAC address
non-critical.
2021-11-27 06:39:04 +09:00
Zbigniew Jędrzejewski-Szmek
66a8eddd6d
Merge pull request #21360 from yuwata/network-json
...
network: json: add more information
2021-11-26 11:04:52 +01:00
Yu Watanabe
146726b2f5
test-network: add basic tests of json output
2021-11-25 22:35:35 +09:00
Yu Watanabe
a8840714f3
network: make MACAddress= takes hardware address with its length is INFINIBAND_ALEN
...
Also, the multicast and local bits in the specified MAC address for
ethernet are adjusted.
2021-11-25 22:03:19 +09:00
Yu Watanabe
b36caceb88
test-network: check if actually alternative name is set
...
Fixes #21404 .
2021-11-17 12:58:08 +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
Yu Watanabe
5b47f35d0e
test-network: reconfigure interface instead of restarting networkd
2021-10-26 08:20:29 +09:00
Frantisek Sumsal
035af7adfe
test: disable ProtectHome= when collecting coverage as well
...
Depending on the location of the original build dir, either ProtectHome=
or ProtectSystem= may get in the way when creating the gcov metadata
files.
Follow-up to:
* 02d7e73013
* 6c9efba677
2021-10-23 21:27:20 +02:00
Frantisek Sumsal
6c9efba677
test: loosen certain sandbox restrictions when collecting coverage
...
With `ProtectSystem=strict` gcov is unable to write the *.gcda files
with collected coverage. Let's add a yet another switch to make such
restriction less strict to make gcov happy.
This addresses following errors:
```
...
systemd-networkd[272469]: profiling:/systemd-meson-build/src/shared/libsystemd-shared-249.a.p/binfmt-util.c.gcda:Cannot open
systemd-networkd[272469]: profiling:/systemd-meson-build/src/shared/libsystemd-shared-249.a.p/base-filesystem.c.gcda:Cannot open
systemd-networkd[272469]: profiling:/systemd-meson-build/src/shared/libsystemd-shared-249.a.p/barrier.c.gcda:Cannot open
systemd-networkd[272469]: profiling:/systemd-meson-build/src/shared/libsystemd-shared-249.a.p/ask-password-api.c.gcda:Cannot open
systemd-networkd[272469]: profiling:/systemd-meson-build/src/shared/libsystemd-shared-249.a.p/apparmor-util.c.gcda:Cannot open
systemd-networkd[272469]: profiling:/systemd-meson-build/src/shared/libsystemd-shared-249.a.p/acpi-fpdt.c.gcda:Cannot open
...
```
2021-10-21 17:36:45 +02:00
Frantisek Sumsal
dded88acb9
test: wait a bit for the given PID to die if it's still alive
...
When playing around with the coverage-enabled build I kept hitting
an issue where dnsmasq failed to start because the previous instance was
still shutting down. This should, hopefully, help to mitigate that.
2021-10-21 15:59:57 +02:00
Yu Watanabe
a4a1385e07
test-network: cleanup dnsmasq related file on setup
...
Just for safety.
2021-10-20 03:49:05 +09:00
Yu Watanabe
888f57c11c
test-network: drop pid_file argument from stop_dnsmasq()
2021-10-20 03:49:05 +09:00
Yu Watanabe
ed08ed4a45
test-network: use constant variables in dnsmasq command
2021-10-20 03:49:05 +09:00
Zbigniew Jędrzejewski-Szmek
1d9a1215e8
gitattributes: introduce and use "generated" attribute
...
I want to mark some files to be ignored for licensing purposes,
e.g. output from fuzzers and other samples. By using the gitattribute
machinery for this we don't need to design a custom protocol:
$ git check-attr generated test/test-sysusers/unhappy-*
test/test-sysusers/unhappy-1.expected-err: generated: set
test/test-sysusers/unhappy-1.input: generated: unspecified
test/test-sysusers/unhappy-2.expected-err: generated: set
test/test-sysusers/unhappy-2.input: generated: unspecified
test/test-sysusers/unhappy-3.expected-err: generated: set
test/test-sysusers/unhappy-3.input: generated: unspecified
2021-10-18 09:42:55 +02: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
8be102f8b8
test-network: kernel treats the lowest IP address as unicast since 5.14
...
See kernel's 94c821c74bf5fe0c25e09df5334a16f98608db90.
2021-09-13 21:41:16 +02:00
Yu Watanabe
b06469a66c
test-network: add tests for KeepMaster=
2021-09-04 08:15:30 +09:00
Tom Yan
c918b70a4d
network: default LinkLocalAddresssing= to no for link stacked with a passthru mode MACVLAN/MACVTAP
...
For similar reason to the case of a bridge slave: we don't want any IP configuration for it.
2021-08-26 06:11:41 +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
Yu Watanabe
c4f7a34756
network: do not assume the highest priority when Priority= is unspecified
...
Previously, when Priority= is unspecified, networkd configured the rule with
the highest (=0) priority. This commit makes networkd distinguish the case
the setting is unspecified and one explicitly specified as Priority=0.
Note.
1) If the priority is unspecified on configure, then kernel dynamically picks
a priority for the rule.
2) The new behavior is consistent with 'ip rule' command.
Replaces #15606 .
2021-08-18 15:57:45 +09:00
Maxime de Roucy
d419ef0243
network: add address label on dhcpv4
...
Fixes : #13967
2021-08-17 02:40:18 +09:00
Yu Watanabe
1d0c9bd753
test-network: add a testcase for recreating stacked netdevs
2021-08-12 15:03:50 +09:00
Yu Watanabe
af0d4e6ef5
test-network: test static lease outside of pool
2021-08-11 16:43:26 +09:00
Yu Watanabe
3bad5487e9
test-network: add a testcase to enter unmanaged state on reconfiguring
2021-08-10 14:44:47 +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
Yu Watanabe
4df8a8e809
test-network: add a testcase for semi-static route with Gateway=_dhcp4 when UseGateway=no
2021-07-15 04:17:14 +09:00
Yu Watanabe
87e62d32b4
test-network: adjust testcases to follow the previous changes
2021-07-15 04:17:14 +09:00
Yu Watanabe
1d26d4cd14
test-network: add a testcase for ManageForeignRoutes=no
2021-07-12 20:59:42 +09:00
Yu Watanabe
4492443124
test-network: update tests for ipv4acd
2021-07-01 00:49:03 +09:00
Dan Streetman
61764fe4e2
test: add test to verify RequiredForOnline= setting with ActivationPolicy=
...
Add test to verify that the RequiredForOnline= value is correct based on
the configuration of ActivationPolicy=
2021-06-24 08:33:29 -04:00
Hristo Venev
2e8a32afbc
networkd: Permit all-zero RoutingPolicyRule prefixes
...
For example this `From` address range is no longer ignored:
[RoutingPolicyRule]
From=0.0.0.0/8
2021-06-22 20:19:12 +09:00
Luca Boccassi
2fbb5df8e9
Merge pull request #19898 from yuwata/network-multipath-route-without-interface-name
...
network: set link ifindex when multi-path routes specified without interface name
2021-06-14 14:27:50 +01:00
Yu Watanabe
740b638267
test-network: disable dynamic addressing protocols when ConfigureWithoutCarrier= is enabled
2021-06-12 08:51:16 +09:00
Yu Watanabe
705c7b1860
test-network: refuse routable state when no-carrier is expected
...
If we do not set the maximum operstate in wait-online, then routable
state is allowed when no-carrier state is expected.
2021-06-12 08:51:16 +09:00
Yu Watanabe
7a0fef8688
test-network: add a testcase for MultiPathRoute= without interface name
2021-06-12 05:37:57 +09:00
Yu Watanabe
4681ab5547
test-network: add a test case for IPv6StableSecretAddress=
2021-06-09 04:56:52 +09:00
Yu Watanabe
9373f5a812
test-network: fix setting name
...
This fixes an issue introduced by 72ffb9133d
.
2021-06-08 06:33:27 +09:00
Yu Watanabe
4e0006cc4b
test-network: add a testcase for UplinkInterface= for DHCP server
2021-06-08 06:33:27 +09:00
borna-blazevic
ffaece68bc
test-network: add a testcase for DHCP static lease
2021-05-27 15:57:33 +09:00
Yu Watanabe
06043c7821
test-network: refuse RA if not necessary
2021-05-26 21:22:13 +09:00
Yu Watanabe
618da3e7d5
test-network: wait for that the link is in configuring state at the beginning
2021-05-26 21:13:56 +09:00
Yu Watanabe
70f32a260b
udev/net: do not manage loopback interfaces
...
There are nothing we can configure in udevd for loopback interfaces;
no ethertool configs can be applied, MAC address, interface name should
not be touched.
2021-05-23 22:58:47 +09:00
Yu Watanabe
9c8f90d0f9
test-network: add a test case for nexthop Group= setting
2021-05-22 04:59:45 +09:00
Yu Watanabe
db5486b450
test-network: add a testcase for OutgoingInterface= in [BridgeFDB]
2021-05-20 18:23:15 +09:00
Yu Watanabe
72ffb9133d
test-network: add testcases for ServerAddress=
2021-05-18 20:20:24 +09:00
Yu Watanabe
932e157b5e
test-network: wait for the interfaces are configured after reloading .network files
2021-05-12 11:26:06 +09:00
Yu Watanabe
1ef2eedce7
test-network: wait for the intreface is configured if it is expected
2021-05-12 11:26:06 +09:00
Jörg Deckert
dd568427fb
networkd: correct batman-adv setting name (GatewayBandwidth) ( #19539 )
...
Co-authored-by: Jörg Deckert <jdeckert@unitas-network.de>
2021-05-08 14:39:32 +02:00
Yegor Alexeyev
11c38d3e51
rfc3046 implementation
2021-05-08 15:59:29 +09:00
Yu Watanabe
4bd7e99232
test-network: set DNS= and NTP= for DHCP server
...
Now, RoutesToDNS= and RoutesToNTP= are enabled by default on DHCPv4
client. So, if DHCP server picks up DNS or NTP servers from uplink,
then the routes may break CI environment.
Hopefully fixes #19463 .
2021-04-30 10:57:17 +02:00
Yu Watanabe
e1220a70de
test-network: add tests for RoutesToNTP=
2021-04-27 00:01:18 +09:00
Yu Watanabe
625772c9c1
test-network: update tests for DHCP routes
...
This removes static-route option from the default dnsmasq command.
2021-04-23 08:49:29 +09:00
Yu Watanabe
3e726c156b
test-network: update test for RouteMetric=
2021-04-21 13:55:02 +09:00
Yegor Alexeyev
c95df5879e
relay role implementation
2021-04-20 15:11:53 +02:00
LetzteInstanz
70448bb1c1
test-network: test waiting for address family
2021-04-14 09:00:12 +09:00
Annika Wickert
c0267a592a
network: Implement B.A.T.M.A.N. Advanced interface type
2021-02-25 01:57:29 +09:00
Yu Watanabe
9947c7bad1
test-network: add tests for dropping unnecessary nexthops
2021-02-23 22:48:12 +09:00
Yu Watanabe
69a91c704e
test-network: add tests for Blackhole= setting in [NextHop] section
2021-02-23 02:21:35 +09:00
Yu Watanabe
84d32bf59b
test-network: test wireguard peer in drop-in config
...
Closes #18241 .
2021-02-22 21:33:36 +09:00
Yu Watanabe
e2d9bc5cfd
test-network: add a test for OnLink= in [NextHop] section
2021-02-21 05:16:27 +09:00
Yu Watanabe
045db4fa0d
test-network: add tests for Broadcast= with boolean settings
2021-02-20 14:23:07 +09:00
Yu Watanabe
cee0f719d8
test-network: add tests for NextHop= setting in [Route]
2021-02-19 22:42:39 +09:00
Yu Watanabe
6cd8f9b5f2
test-network: add tests for Family= in [NextHop]
2021-02-17 15:55:37 +09:00
Yu Watanabe
4a70450104
test-network: merge test_address_static and test_address_preferred_lifetime_zero_ipv6
2021-02-12 23:09:21 +09:00
Yu Watanabe
beb75dd31d
test-network: support protocol and linkdown flag for ff00::/8 route
...
Fixes #18507 .
2021-02-09 12:25:27 +01:00
Yu Watanabe
0fb613000d
test-network: disable NDISC on veth-peer
...
This should speed the tests up.
2021-02-03 22:09:07 +00:00
Yu Watanabe
37baf8db56
Merge pull request #18380 from yuwata/test-network-ipv6-proxy-ndp
...
test-network: add tests for IPv6ProxyNDPAddress=
2021-01-27 10:47:36 +09:00
Yu Watanabe
f0d87798ea
test-network: retry several times if expected LLDP info is not obtained
...
As LLDP thing does not get involved in the link status, `networkctl lldp`
may not provide an expected information even if the link is in
'configured' state.
Fixes #17360 .
2021-01-26 18:48:44 +01:00
Yu Watanabe
cff0cadcac
test-network: add tests for IPv6ProxyNDPAddress=
2021-01-27 01:28:28 +09:00
Dan Streetman
a853652ae9
save link activation policy to state file and display in networkctl
2021-01-21 12:05:17 -05:00
Dan Streetman
2236d75df9
test: add ActivationPolicy= unit tests
2021-01-21 12:05:17 -05:00
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
610e747748
test-network: use new IPv6SendRA= setting
2020-10-19 14:55:21 +09:00
Yu Watanabe
9087e3d609
test-network: do not use deprecated value
2020-10-15 07:08:27 +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
0a2808a208
test-network: drop meaningless Scope= settings in the config
2020-10-07 15:22:10 +02: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
47f8411249
test-network: disable RA in test_sriov
...
We usually disable IPv6AcceptRA= if the test does not require any
dynamic address configuration, as it makes slightly slow down the test.
C.f. 491b79aeac
.
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
Yu Watanabe
6dcc637574
test-network: drop duplicated address
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
7f8c1e95a5
test-network: add test for duplicated IPv6Token=
2020-07-22 20:26:11 +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
Yu Watanabe
491b79aeac
test-network: set IPv6AcceptRA=no if no dynamic addresses are not required
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
c03ef420fa
network: tc: rename several settings which take size in bytes
2020-07-02 16:51:11 +02: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
Yu Watanabe
440988666c
test-network: remove unused config
2020-06-25 17:30:19 +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
Yu Watanabe
891ff9633f
test-network: add tests for QFQ
2020-06-03 17:25:48 +09:00
Yu Watanabe
da3509f0f5
test-network: add test for wireguard without peers
2020-06-01 14:23:03 +09:00
Dan Streetman
0fc0d85fae
test: add bridge configure-without-carrier test
...
Verify configure-without-carrier works, and retains configuration
across carrier losses/gains.
2020-05-26 09:52:55 -04:00
Dan Streetman
9bacf4313e
test: expand configure-without-carrier test
...
The test currently doesn't actually test configure-without-carrier since
it does have carrier for the entire test. It now forces carrier down
before starting the network portion of the test. Also, it tests to verify
the configuration is retained across future carrier losses/gains.
2020-05-26 09:52:55 -04:00
Dan Streetman
06c2b0c76b
test: verify RoutesToDNS= is independent of UseGateway=
2020-04-21 17:21:37 -04:00
Dan Streetman
7c0d36ff5f
test: modify/add tests for UseRoutes= and UseGateway= configuration
...
The last commit changed the UseGateway= default to the value of UseRoutes=
so the tests need to check for all combinations of the two parameters.
2020-04-21 17:15:02 -04:00
Yu Watanabe
0d7bd445d2
test-network: add a test case for DHCPv4.UseGateway=no
2020-03-16 19:34:47 +09:00
Yu Watanabe
970ab1fcc0
test-network: add a test case for HHF
2020-03-12 15:47:03 +09:00
Yu Watanabe
41bb371bb0
test-network: add a test case for PFIFOFast
2020-03-12 15:39:10 +09:00
Yu Watanabe
73136507ac
test-network: add a test case for PFIFOHeadDrop
2020-03-12 15:38:15 +09:00
Yu Watanabe
7b1a31a3d0
test-network: add a test case for BFIFO
2020-03-12 15:37:15 +09:00
Yu Watanabe
557fa421ff
test-network: add a test case for DRR
2020-03-12 15:35:51 +09:00
Yu Watanabe
be94e591fb
test-network: add test case for PIE
2020-03-12 15:34:46 +09:00
Yu Watanabe
bba1f90ff5
Merge pull request #14890 from yuwata/network-tc-next
...
network: tc-next
2020-03-07 01:44:15 +09:00
Chris Down
5bb67b107f
Merge pull request #14956 from ssahani/delegated-prefix-14474
...
nettwork: introduce delegated prefix assign
2020-03-06 16:13:13 +00:00
Yu Watanabe
f6c6af3811
test-network: add a test case for CAKE
2020-03-02 15:59:37 +09:00
Yu Watanabe
f2c5c1296a
test-network: add a test case for sfb
2020-03-02 15:48:24 +09:00
Yu Watanabe
95edcf3fac
test-network: add a test case for GRED
2020-03-02 15:48:24 +09:00
Yu Watanabe
bc0769c9f7
test-network: add a test case for PFIFO
2020-03-02 15:48:11 +09:00
Yu Watanabe
f1de1eb3e3
test-network: add test case for HTB class
2020-03-02 15:46:28 +09:00
Yu Watanabe
931c8c824a
test-network: add a test case for HTB
2020-03-02 15:46:28 +09:00
Yu Watanabe
834ea1a466
test-network: remove unnecessary dummy interface
2020-03-02 15:44:03 +09:00
Yu Watanabe
4c2e1833ec
test-network: add a test case for [DHCPv4] UseRoutes=no
2020-03-02 01:28:27 +09:00
Yu Watanabe
3c874fd79d
test-network: add a test case for [IPv6Prefix] Assign=yes
2020-03-01 00:49:24 +09:00
Yu Watanabe
40afe4916a
test-network: add one more test case for VRF=
2020-02-26 19:21:53 +09:00
Yu Watanabe
1d6cfd25a2
Merge pull request #14833 from kpfleming/multiple-ipv6token-addresses
...
Support multiple IPv6Token 'static' addreses on an interface
2020-02-12 02:10:44 +09:00
Kevin P. Fleming
c24c83dc67
network: Allow multiple IPv6Token 'static' items to generate addresses
...
This patch allows multiple addresses using 'static' IPv6Tokens to
be generated for a single network interface.
2020-02-10 18:40:57 +09:00
Yu Watanabe
38d1255a52
test-network: add tests for qdisc Handle=
2020-02-10 17:49:02 +09:00
Yu Watanabe
f7ada4b8ec
test-network: tentatively stops .socket units for udevd
...
To suppress the following warning:
---
Warning: Stopping systemd-udevd.service, but it can still be activated by:
systemd-udevd-control.socket
systemd-udevd-kernel.socket
2020-02-10 00:51:00 +09:00
Kevin P. Fleming
b241fa00e9
network: Add test for explicit 'static' IPv6Token
...
Add a test case for an explicitly-specified 'static' IPv6Token.
Signed-off-by: Kevin P. Fleming <kevin@km6g.us>
2020-02-10 00:41:34 +09:00
Zbigniew Jędrzejewski-Szmek
c3b41d8811
Merge pull request #14805 from yuwata/network-ipv6-token-follow-up
...
network: rename eui64 to static
2020-02-07 17:05:33 +01:00
Yu Watanabe
3d55b5a9de
test-network: add test for teql
2020-02-07 17:41:49 +09:00
Yu Watanabe
ab9dc1db47
test-network: add more tests for traffic control
2020-02-07 17:41:43 +09:00
Yu Watanabe
e2c4070edf
network: rename eui64 to static
...
See RFC 4291.
Follow-up for 5f506a5560
.
2020-02-07 13:30:40 +09:00
Yu Watanabe
87bbebeab6
test-network: add tests for IPv6Token=
2020-02-05 17:44:42 +09:00