git: 34d8fffff313 - main - SIFTR: Fix compilation with -DSIFTR_IPV6

From: Allan Jude <allanjude_at_FreeBSD.org>
Date: Thu, 04 Nov 2021 00:32:47 UTC
The branch main has been updated by allanjude:

URL: https://cgit.FreeBSD.org/src/commit/?id=34d8fffff313d026ed3bb5c0befc8212eaa27d2d

commit 34d8fffff313d026ed3bb5c0befc8212eaa27d2d
Author:     Allan Jude <allanjude@FreeBSD.org>
AuthorDate: 2021-11-04 00:31:13 +0000
Commit:     Allan Jude <allanjude@FreeBSD.org>
CommitDate: 2021-11-04 00:32:17 +0000

    SIFTR: Fix compilation with -DSIFTR_IPV6
    
    A few pieces of the SIFTR code that are behind #ifdef SIFTR_IPV6 have
    not been updated as APIs have changed, etc.
    
    Reported by:    Alexander Sideropoulos <Alexander.Sideropoulos@netapp.com>
    Reviewed by:    rscheff, lstewart
    Sponsored by:   NetApp
    Sponsored by:   Klara Inc.
    Differential Revision:  https://reviews.freebsd.org/D32698
---
 sys/netinet/siftr.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c
index 2a6bf5e71151..00a4f477ad2e 100644
--- a/sys/netinet/siftr.c
+++ b/sys/netinet/siftr.c
@@ -99,7 +99,7 @@ __FBSDID("$FreeBSD$");
 
 #ifdef SIFTR_IPV6
 #include <netinet/ip6.h>
-#include <netinet/ip6_var.h>
+#include <netinet6/ip6_var.h>
 #include <netinet6/in6_pcb.h>
 #endif /* SIFTR_IPV6 */
 
@@ -1007,8 +1007,9 @@ ret:
 }
 
 #ifdef SIFTR_IPV6
-static int
-siftr_chkpkt6(struct mbuf **m, struct ifnet *ifp, int flags, struct inpcb *inp)
+static pfil_return_t
+siftr_chkpkt6(struct mbuf **m, struct ifnet *ifp, int flags,
+    void *ruleset __unused, struct inpcb *inp)
 {
 	struct pkt_node *pn;
 	struct ip6_hdr *ip6;
@@ -1134,7 +1135,7 @@ ret6:
 
 VNET_DEFINE_STATIC(pfil_hook_t, siftr_inet_hook);
 #define	V_siftr_inet_hook	VNET(siftr_inet_hook)
-#ifdef INET6
+#ifdef SIFTR_IPV6
 VNET_DEFINE_STATIC(pfil_hook_t, siftr_inet6_hook);
 #define	V_siftr_inet6_hook	VNET(siftr_inet6_hook)
 #endif