Module Name: src
Committed By: christos
Date: Fri May 12 08:03:26 UTC 2017
Modified Files:
src/sys/external/bsd/ipf/netinet: ip_fil_netbsd.c
Log Message:
Call the right filter function for hook removal found by Stephen Borrill.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c
diff -u src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.22 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.23
--- src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.22 Mon Feb 13 22:05:06 2017
+++ src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c Fri May 12 04:03:26 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_fil_netbsd.c,v 1.22 2017/02/14 03:05:06 ozaki-r Exp $ */
+/* $NetBSD: ip_fil_netbsd.c,v 1.23 2017/05/12 08:03:26 christos Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -8,7 +8,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.22 2017/02/14 03:05:06 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.23 2017/05/12 08:03:26 christos Exp $");
#else
static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed";
static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp";
@@ -582,8 +582,13 @@ ipfdetach(ipf_main_softc_t *softc)
# if (__NetBSD_Version__ >= 104200000)
# if __NetBSD_Version__ >= 105110000
# if defined(PFIL_TYPE_IFNET) && defined(PFIL_IFNET)
+# if __NetBSD_Version__ >= 799000400
+ (void) pfil_remove_ihook((void *)ipf_pfilsync, NULL,
+ PFIL_IFNET, ph_ifsync);
+# else
(void) pfil_remove_hook((void *)ipf_pfilsync, NULL,
PFIL_IFNET, ph_ifsync);
+# endif
# endif
if (ph_inet != NULL)