svn commit: r321811 - stable/11/sys/netpfil/ipfw

Philip Paeps philip at FreeBSD.org
Mon Jul 31 19:48:30 UTC 2017


Author: philip
Date: Mon Jul 31 19:48:29 2017
New Revision: 321811
URL: https://svnweb.freebsd.org/changeset/base/321811

Log:
  MFC r320941: Fix GRE over IPv6 tunnels with IPFW
  
  Previously, GRE packets in IPv6 tunnels would be dropped by IPFW (unless
  net.inet6.ip6.fw.deny_unknown_exthdrs was unset).
  
  PR:		220640
  Submitted by:	Kun Xie <kxie at xiplink.com>

Modified:
  stable/11/sys/netpfil/ipfw/ip_fw2.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c
==============================================================================
--- stable/11/sys/netpfil/ipfw/ip_fw2.c	Mon Jul 31 19:34:38 2017	(r321810)
+++ stable/11/sys/netpfil/ipfw/ip_fw2.c	Mon Jul 31 19:48:29 2017	(r321811)
@@ -92,6 +92,8 @@ __FBSDID("$FreeBSD$");
 #include <netinet6/ip6_var.h>
 #endif
 
+#include <net/if_gre.h> /* for struct grehdr */
+
 #include <netpfil/ipfw/ip_fw_private.h>
 
 #include <machine/in_cksum.h>	/* XXX for in_cksum */
@@ -1160,6 +1162,11 @@ do {								\
 			case IPPROTO_PIM:
 				/* XXX PIM header check? */
 				PULLUP_TO(hlen, ulp, struct pim);
+				break;
+
+			case IPPROTO_GRE:	/* RFC 1701 */
+				/* XXX GRE header check? */
+				PULLUP_TO(hlen, ulp, struct grehdr);
 				break;
 
 			case IPPROTO_CARP:


More information about the svn-src-stable-11 mailing list