Commit Graph

373 Commits

Author SHA1 Message Date
Susant Sahani efecf9cd15 test-network: Add test for invert RPDB rule 2018-12-06 11:00:36 +05:30
Susant Sahani d0e728b6cd test-network: add test for ISATAP 2018-12-03 09:16:06 +05:30
Yu Watanabe c0bf673376 test-network: stop systemd-networkd.socket during testing
To suppress noisy warning messages.
2018-11-28 22:00:40 +01:00
Yu Watanabe bad4969bba test-network: clear state file before starting networkd
Otherwise, some tests may disturb others, e.g.,
NetworkdNetWorkTests.test_routing_policy_rule_port_range and
NetworkdNetWorkTests.test_routing_policy_rule.
2018-11-28 21:40:57 +01:00
Yu Watanabe d486a2d0c1 test-network: use /run instead of legacy /var/run 2018-11-28 19:55:01 +01:00
Yu Watanabe fab57f7f13
Merge pull request #10948 from ssahani/iprule-port-proto
networkd: add support to configure ip rule port range and protocol.
2018-11-29 03:17:36 +09:00
Susant Sahani 926062f083 networkd: add support to configure ip rule port range and protocol.
Please see:

iprule: support for ip_proto, sport and dport match options
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=f686f764682745daf6a93b0a6330ba42a961f858

Closes 10622
2018-11-28 20:06:28 +05:30
Susant Sahani 0d34228fc0 fix: systemd-networkd reverse route ordering
We missing a default route. Add gateway first.

This fixes https://github.com/systemd/systemd/issues/5430
2018-11-28 23:19:00 +09:00
Susant Sahani 2266864b04 networkd: Add support for ERSPAN tunnel
Please see: https://patchwork.ozlabs.org/patch/800327/
```
[NetDev]
Name=erspan-test
Kind=erspan

[Tunnel]
Independent=true
ERSPANIndex=123
Local = 172.16.1.200
Remote = 172.16.1.100
Key=101
SerializeTunneledPackets=true
```
2018-11-27 11:04:42 +09:00
Yu Watanabe f5050e48ae test-network: add tests for #5430 and GatewayOnLink= 2018-11-26 18:47:52 +01:00
Yu Watanabe d80734f7cd test-network: add one more test for netdev dropin .conf files
For netdev, config files are loaded twice, and the first time,
only Match and NetDev setions are read. So, the test given by
the previous commit covers only the second loading.
This adds another test that also covers the first loading.
2018-11-26 22:48:27 +09:00
Yu Watanabe 013c8dc94d test-network: add tests for dropin .conf files 2018-11-26 15:01:01 +09:00
David Anderson d29dc4f1b8 Add a networkd test for 6rd interface creation.
Unfortunately we can't check the 6rd attribute, because it's not
exposed in /sys or anywhere other than netlink... But at least we
can check that networkd brings up an interface that looks right.
2018-11-09 18:45:38 -08:00
Lennart Poettering a54e373163
Merge pull request #10618 from yuwata/fix-10615
network: fix several issues in config parser
2018-11-05 17:37:25 +03:00
Evgeny Vereshchagin 201bf07f7c tests: also use lsmod to check whether modules are available (#10634)
It's not entirely impossible to screw something up playing with
kernel modules on a Saturday evening :-) This PR fixes a scenario
where a module has been loaded into the kernel but the module itself
has been removed from the disk.

```
$ lsmod | grep wireg
wireguard             225280  0
ip6_udp_tunnel         16384  1 wireguard
udp_tunnel             16384  1 wireguard

$ modprobe wireguard
modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.18.16-200.fc28.x86_64

$ sudo ./systemd-networkd-tests.py NetworkdNetDevTests.test_wireguard
...
modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.18.16-200.fc28.x86_64
test_wireguard (__main__.NetworkdNetDevTests) ... unexpected success

----------------------------------------------------------------------
Ran 1 test in 5.152s

FAILED (unexpected successes=1)
```

This is a follow-up to https://github.com/systemd/systemd/pull/10625.
2018-11-05 12:47:38 +09:00
Evgeny Vereshchagin 7a3bc5a8e5 tests: add a basic test for wireguard (#10631) 2018-11-04 02:03:43 +09:00
Yu Watanabe 9a4720a9ef test-network: wait after removing links
After ec6a47044a, networkd starts
soon after removing links used by previous test. That causes
some racy situation of removing links and detecting links by networkd.
2018-11-04 00:31:46 +09:00
Evgeny Vereshchagin 7a0a37b283 tests: mark a few tests as expected failures when the required modules aren't available
Closes https://github.com/systemd/systemd/issues/10617.
2018-11-03 00:12:01 +01:00
Evgeny Vereshchagin f7bdd562a9 tests: make NetworkdNetWorkTests.test_routing_policy_rule pass on CentOS
Depending on the content of /etc/iproute2/rt_dsfield, ip can print either
`0x08` or `throughput` as was shown in https://github.com/systemd/systemd/issues/10617#issuecomment-435200859.
2018-11-02 17:10:59 +01:00
Tobias Jungel 99f68ef02d networkd: add missing bonding options (#10542)
Add support for bonding options system prio, port key and actor system mac.

These options exist in the linux kernel since 4.2
(torvalds/linux@171a42c38c)

Details:
https://www.kernel.org/doc/Documentation/networking/bonding.txt
2018-11-02 10:31:20 +09:00
Yu Watanabe 6aea927681 test: make systemd-networkd-tests.py run on arbitrary directory 2018-10-03 14:38:30 +09:00
Yu Watanabe ec6a47044a test: replace stop+start by restart
This suppress the following warnings:
```
Warning: Stopping systemd-networkd.service, but it can still be activated by:
  systemd-networkd.socket
```
2018-10-03 14:36:34 +09:00
Susant Sahani 1f0e310952 test: Add tests for networkd (#10147) 2018-09-29 14:36:25 +02:00