9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [patch] fix gre retunnel logic
@ 2023-01-05 20:28 Arne Meyer
  2023-01-06 13:35 ` cinap_lenrek
  2023-01-07  2:23 ` cinap_lenrek
  0 siblings, 2 replies; 4+ messages in thread
From: Arne Meyer @ 2023-01-05 20:28 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

Hello,

the retunnel logic in the gre code is wrong. It gets applied to any protocol type that is not pptp but should only process encapsulated ip4 packets. With this patch I got my userspace ethernet over gre tunnel to work.

Greetings,
Arne

[-- Attachment #2: gre.patch --]
[-- Type: application/octet-stream, Size: 319 bytes --]

diff c10be29c773737c4159b613f4f6c3b5a90d732f6 uncommitted
--- a/sys/src/9/ip/gre.c
+++ b/sys/src/9/ip/gre.c
@@ -560,7 +560,7 @@
 
 	qlock(proto);
 
-	if(eproto != 0x880B && BLEN(bp) - hdrlen >= sizeof(Ip4hdr)){
+	if(eproto == 0x0800 && BLEN(bp) - hdrlen >= sizeof(Ip4hdr)){
 		ip = (Ip4hdr *)(bp->rp + hdrlen);
 
 		/*

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-13 16:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-05 20:28 [9front] [patch] fix gre retunnel logic Arne Meyer
2023-01-06 13:35 ` cinap_lenrek
2023-01-07  2:23 ` cinap_lenrek
2023-01-13 16:56   ` Arne Meyer

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).