Skip to contentSkip to conversation

tun/netstack: implement MaxHeaderLength

PATCH In review [email protected] 2 participants 2 messages Mar 14, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tun/netstack: implement MaxHeaderLength

From: John Sahhar <[email protected]>

---
 tun/netstack/tun.go | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
tun/netstack/tun.go +5 -2
index 8b1bb7f..94b59f8 100644
@@ -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
#1 lore raw

Can you describe what this is doing in a real commit message? And why is the v6 case smaller than v4?