ipfw: teach ipfw that pfsync is an upper layer protocol

Explicitly add pfsync as a know upper layer protocol so we don't
automatically discard pfsync packets (carried over IPv6).

net.inet6.ip6.fw.deny_unknown_exthdrs defaults to 1, so even if
net.inet.ip.fw.default_to_accept is set to 1 we'd discard pfsync (over
IPv6).

Reviewed by:	ae
Differential Revision:	https://reviews.freebsd.org/D40973
This commit is contained in:
Kristof Provost 2023-07-11 12:37:17 +02:00
parent d744a37a3a
commit 66f2f9ee08

View file

@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$");
#include <net/route/nhop.h>
#include <net/pfil.h>
#include <net/vnet.h>
#include <net/if_pfsync.h>
#include <netpfil/pf/pf_mtag.h>
@ -1718,6 +1719,10 @@ do { \
PULLUP_TO(hlen, ulp, struct ip);
break;
case IPPROTO_PFSYNC:
PULLUP_TO(hlen, ulp, struct pfsync_header);
break;
default:
if (V_fw_verbose)
printf("IPFW2: IPV6 - Unknown "