diff options
author | darrenr <darrenr@FreeBSD.org> | 2000-07-31 13:11:42 +0000 |
---|---|---|
committer | darrenr <darrenr@FreeBSD.org> | 2000-07-31 13:11:42 +0000 |
commit | d18ce92d580ccae82a3d998f6127986ad1690a09 (patch) | |
tree | 16f6dbf24b21c74396eb07b8e0a16ea1e30c777a /sys/contrib | |
parent | cc221d575afd5334c5ac8e02eeaaa48fec13df38 (diff) | |
download | FreeBSD-src-d18ce92d580ccae82a3d998f6127986ad1690a09.zip FreeBSD-src-d18ce92d580ccae82a3d998f6127986ad1690a09.tar.gz |
activate pfil_hooks and covert ipfilter to use it
Diffstat (limited to 'sys/contrib')
-rw-r--r-- | sys/contrib/ipfilter/netinet/ip_fil.c | 13 | ||||
-rw-r--r-- | sys/contrib/ipfilter/netinet/ip_fil.h | 3 |
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_fil.c b/sys/contrib/ipfilter/netinet/ip_fil.c index 746df30..e6cdb81 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.c +++ b/sys/contrib/ipfilter/netinet/ip_fil.c @@ -190,7 +190,8 @@ struct devsw iplsw = { }; #endif /* _BSDI_VERSION >= 199510 && _KERNEL */ -#if defined(__NetBSD__) || defined(__OpenBSD__) || (_BSDI_VERSION >= 199701) +#if defined(__NetBSD__) || defined(__OpenBSD__) || \ + (_BSDI_VERSION >= 199701) || (__FreeBSD_Version >= 50011) # include <sys/conf.h> # if defined(NETBSD_PF) # include <net/pfil.h> @@ -231,7 +232,8 @@ int iplattach() { char *defpass; int s; -# if defined(__sgi) || (defined(NETBSD_PF) && (__NetBSD_Version__ >= 104200000)) +# if defined(__sgi) || (defined(NETBSD_PF) && \ + ((__NetBSD_Version__ >= 104200000) || (__FreeBSD_Version >= 50011))) int error = 0; # endif @@ -253,7 +255,7 @@ int iplattach() return -1; # ifdef NETBSD_PF -# if __NetBSD_Version__ >= 104200000 +# if (__NetBSD_Version__ >= 104200000) || (__FreeBSD_Version >= 50011) error = pfil_add_hook((void *)fr_check, PFIL_IN|PFIL_OUT, &inetsw[ip_protox[IPPROTO_IP]].pr_pfh); if (error) { @@ -338,7 +340,8 @@ pfil_error: int ipldetach() { int s, i = FR_INQUE|FR_OUTQUE; -#if defined(NETBSD_PF) && (__NetBSD_Version__ >= 104200000) +#if defined(NETBSD_PF) && \ + ((__NetBSD_Version__ >= 104200000) || (__FreeBSD_Version >= 50011)) int error = 0; #endif @@ -372,7 +375,7 @@ int ipldetach() fr_running = 0; # ifdef NETBSD_PF -# if __NetBSD_Version__ >= 104200000 +# if ((__NetBSD_Version__ >= 104200000) || (__FreeBSD_Version >= 50011)) error = pfil_remove_hook((void *)fr_check, PFIL_IN|PFIL_OUT, &inetsw[ip_protox[IPPROTO_IP]].pr_pfh); if (error) diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 0d7ff05..4c24f9c 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -468,7 +468,8 @@ typedef struct ipflog { * with this! */ #if (defined(NetBSD) && (NetBSD > 199609) && (NetBSD <= 1991011)) || \ - (defined(NetBSD1_2) && NetBSD1_2 > 1) + (defined(NetBSD1_2) && NetBSD1_2 > 1) || (defined(__FreeBSD_version) && \ + (__FreeBSD_version >= 500011)) # if (NetBSD >= 199905) # define PFIL_HOOKS # endif |