Bug 240059 - Min MTU for a interface GIF interface is to high
Summary: Min MTU for a interface GIF interface is to high
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-23 17:32 UTC by Sir l33tname
Modified: 2019-08-23 18:57 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sir l33tname 2019-08-23 17:32:12 UTC
The Min MTU for a GIF interface is 1280.
See: 
https://github.com/freebsd/freebsd/blob/c4ed3acb9f59d3498905e95d5d445c5046fdfdb6/sys/net/if_gif.h#L80-L82
#define	GIF_MTU_MIN	(1280) /* Minimum MTU */

There are some cases where this is still to high. 
And to quote the man page:

If the outer protocol is IPv6, path MTU discovery for encapsulated
packets may affect communication over the interface.  The first bigger-
than-pmtu packet may be lost.  To avoid the problem, you may want to set
the interface MTU for gif to 1240 or smaller, when the outer header is
IPv6 and the inner header is IPv4.

So I would expect that it is possible to set the MTU for a GIF interface lower than 1280.
Comment 1 Sir l33tname 2019-08-23 18:57:02 UTC
it's according to the ipv6 rfc 8200

IPv6 requires that every link in the internet have an MTU of 1280 octets or greater.  On any link that cannot convey a 1280-octet packet in one piece, link-specific fragmentation and reassembly must be provided at a layer below IPv6.