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.
This commit is contained in:
Yuxiang Zhu
2023-06-29 18:11:52 +08:00
committed by GitHub
parent 9d5c20657a
commit b67e8a4e3e
7 changed files with 33 additions and 4 deletions

View File

@@ -1220,7 +1220,19 @@
<term><varname>DiscoverPathMTU=</varname></term>
<listitem>
<para>Takes a boolean. When true, enables Path MTU Discovery on
the tunnel.</para>
the tunnel.
When <varname>IgnoreDontFragment=</varname> is enabled,
defaults to false. Otherwise, defaults to true.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>IgnoreDontFragment=</varname></term>
<listitem>
<para>Takes a boolean. When true, enables IPv4 Don't Fragment (DF) suppression on
the tunnel. Defaults to false.
Note that if <varname>IgnoreDontFragment=</varname> is set to true,
<varname>DiscoverPathMTU=</varname> cannot be set to true.
Only applicable to GRE, GRETAP, and ERSPAN tunnels.</para>
</listitem>
</varlistentry>
<varlistentry>