shithub: plan9front

Download patch

ref: 51135e37edff6e0cf928fababe1b27c6c48c1087
parent: 6cbcac7382b847ed824a471402702fbae7ad9004
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Jan 6 08:35:16 EST 2023

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

--- 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);
 
 		/*