diff options
| author | Max Laier <mlaier@FreeBSD.org> | 2004-09-29 04:54:33 +0000 |
|---|---|---|
| committer | Max Laier <mlaier@FreeBSD.org> | 2004-09-29 04:54:33 +0000 |
| commit | d6a8d588758b384d3fbf57425b886754c9ed710d (patch) | |
| tree | b760834c7691b17430788d5a6041455045da8ac1 /sys/contrib/ipfilter | |
| parent | 48ac555d83c967d08d612de7f25f3fd13b6e2268 (diff) | |
Notes
Diffstat (limited to 'sys/contrib/ipfilter')
| -rw-r--r-- | sys/contrib/ipfilter/netinet/ip_fil.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_fil.c b/sys/contrib/ipfilter/netinet/ip_fil.c index 9ac3fb2033fb..954f5403de7f 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.c +++ b/sys/contrib/ipfilter/netinet/ip_fil.c @@ -312,7 +312,8 @@ int dir; } # endif #endif /* __NetBSD_Version >= 105110000 && _KERNEL */ -#if (__FreeBSD_version >= 501108) && defined(_KERNEL) +#if (__FreeBSD_version >= 501108) && (__FreeBSD_version < 600004) && \ + defined(_KERNEL) static int fr_check_wrapper(void *arg, struct mbuf **mp, struct ifnet *ifp, int dir) @@ -331,7 +332,29 @@ fr_check_wrapper6(void *arg, struct mbuf **mp, struct ifnet *ifp, int dir) ifp, (dir == PFIL_OUT), mp)); } # endif -#endif /* __FreeBSD_version >= 501108 */ + +#elif (__FreeBSD_version >= 600004) && defined(_KERNEL) + +static int +fr_check_wrapper(void *arg, struct mbuf **mp, struct ifnet *ifp, int dir, + struct inpcb *inp) +{ + struct ip *ip = mtod(*mp, struct ip *); + return fr_check(ip, ip->ip_hl << 2, ifp, (dir == PFIL_OUT), mp); +} + +# ifdef USE_INET6 +# include <netinet/ip6.h> + +static int +fr_check_wrapper6(void *arg, struct mbuf **mp, struct ifnet *ifp, int dir, + struct inpcb *inp) +{ + return (fr_check(mtod(*mp, struct ip *), sizeof(struct ip6_hdr), + ifp, (dir == PFIL_OUT), mp)); +} +# endif +#endif /* __FreeBSD_version >= 600004 && _KERNEL */ #ifdef _KERNEL # if defined(IPFILTER_LKM) && !defined(__sgi) int iplidentify(s) |
