* [PATCH] tun/netstack: implement MaxHeaderLength
@ 2022-03-11 5:28 john
2022-03-14 19:07 ` Jason A. Donenfeld
0 siblings, 1 reply; 2+ messages in thread
From: john @ 2022-03-11 5:28 UTC (permalink / raw)
To: wireguard; +Cc: John Sahhar
From: John Sahhar <john@gravitl.com>
Signed-off-by: John Sahhar <john@gravitl.com>
---
tun/netstack/tun.go | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tun/netstack/tun.go b/tun/netstack/tun.go
index 8b1bb7f..94b59f8 100644
--- a/tun/netstack/tun.go
+++ b/tun/netstack/tun.go
@@ -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 {
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-14 19:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 5:28 [PATCH] tun/netstack: implement MaxHeaderLength john
2022-03-14 19:07 ` Jason A. Donenfeld
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).