tun/netstack: implement MaxHeaderLength
PATCH 1/1 tun/netstack: implement MaxHeaderLength
From: John Sahhar <[email protected]>
Signed-off-by John Sahhar <[email protected]>
--- tun/netstack/tun.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
tun/netstack/tun.go +5 -2
@@ -71,8 +71,11 @@ func (*endpoint) Capabilities() stack.LinkEndpointCapabilities { return stack.CapabilityNone } -func (*endpoint) MaxHeaderLength() uint16 { - return 0 +func (e *endpoint) MaxHeaderLength() uint16 { + if e.hasV6 && !e.hasV4 { + return 40 + } + return 60 } func (*endpoint) LinkAddress() tcpip.LinkAddress {
Signature · 1 line
2.32.0
Can you describe what this is doing in a real commit message? And why is the v6 case smaller than v4?