From: john@gravitl.com
To: wireguard@lists.zx2c4.com
Cc: John Sahhar <john@gravitl.com>
Subject: [PATCH] tun/netstack: implement MaxHeaderLength
Date: Thu, 10 Mar 2022 23:28:32 -0600 [thread overview]
Message-ID: <20220311052832.86700-1-john@gravitl.com> (raw)
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
next reply other threads:[~2022-03-14 17:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-11 5:28 john [this message]
2022-03-14 19:07 ` Jason A. Donenfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220311052832.86700-1-john@gravitl.com \
--to=john@gravitl.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).