diff options
author | Yuxiang Zhu <vfreex+github@gmail.com> | 2023-06-29 12:11:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 12:11:52 +0200 |
commit | b67e8a4e3ede0447d54eca96399b3d5f81dfaecd (patch) | |
tree | ed4d7a1bf87b5b9dddaad2c452f6df3b5598b877 /test/test-network | |
parent | man: Extend journalctl color information (diff) | |
download | systemd-b67e8a4e3ede0447d54eca96399b3d5f81dfaecd.tar.xz systemd-b67e8a4e3ede0447d54eca96399b3d5f81dfaecd.zip |
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.
Diffstat (limited to 'test/test-network')
-rw-r--r-- | test/test-network/conf/25-erspan0-tunnel.netdev | 1 | ||||
-rw-r--r-- | test/test-network/conf/25-gretap-tunnel.netdev | 1 | ||||
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 4 |
3 files changed, 6 insertions, 0 deletions
diff --git a/test/test-network/conf/25-erspan0-tunnel.netdev b/test/test-network/conf/25-erspan0-tunnel.netdev index ee295d901f..0ed03803a6 100644 --- a/test/test-network/conf/25-erspan0-tunnel.netdev +++ b/test/test-network/conf/25-erspan0-tunnel.netdev @@ -13,3 +13,4 @@ Local = 172.16.1.200 Remote = 172.16.1.100 Key=101 SerializeTunneledPackets=true +IgnoreDontFragment=true diff --git a/test/test-network/conf/25-gretap-tunnel.netdev b/test/test-network/conf/25-gretap-tunnel.netdev index 86ac3f7c5b..af5ea2fb2b 100644 --- a/test/test-network/conf/25-gretap-tunnel.netdev +++ b/test/test-network/conf/25-gretap-tunnel.netdev @@ -8,3 +8,4 @@ Local=10.65.223.238 Remote=10.65.223.239 Key=106 SerializeTunneledPackets=true +IgnoreDontFragment=true diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index b5ef83a9c0..c068f37a8a 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -1796,6 +1796,8 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): self.assertRegex(output, 'okey 0.0.0.106') self.assertRegex(output, 'iseq') self.assertRegex(output, 'oseq') + self.assertIn('nopmtudisc', output) + self.assertIn('ignore-df', output) output = check_output('ip -d link show gretap98') print(output) self.assertRegex(output, 'gretap remote 10.65.223.239 local any dev dummy98') @@ -1955,6 +1957,8 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): self.assertNotIn('erspan_hwid 1f', output) self.assertIn('ikey 0.0.0.101', output) self.assertIn('iseq', output) + self.assertIn('nopmtudisc', output) + self.assertIn('ignore-df', output) output = check_output('ip -d link show erspan98') print(output) self.assertIn('erspan remote 172.16.1.100 local any', output) |