diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-11-04 11:33:00 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-11-04 15:28:21 +0100 |
commit | af5333e0a02b2295304d4e029b15ee15a4fe2b3a (patch) | |
tree | c5c43680d374f58b487eeeaf18fb7ec6b84ba074 /freebsd/sys/netinet/ipfw/ip_fw_pfil.c | |
parent | BUS_SPACE(9): Use simple memory model for ARM (diff) | |
download | rtems-libbsd-af5333e0a02b2295304d4e029b15ee15a4fe2b3a.tar.bz2 |
Update to FreeBSD 8.4
Diffstat (limited to 'freebsd/sys/netinet/ipfw/ip_fw_pfil.c')
-rw-r--r-- | freebsd/sys/netinet/ipfw/ip_fw_pfil.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/freebsd/sys/netinet/ipfw/ip_fw_pfil.c b/freebsd/sys/netinet/ipfw/ip_fw_pfil.c index b32a08b7..ebd10c5b 100644 --- a/freebsd/sys/netinet/ipfw/ip_fw_pfil.c +++ b/freebsd/sys/netinet/ipfw/ip_fw_pfil.c @@ -29,15 +29,12 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#if !defined(KLD_MODULE) #include <rtems/bsd/local/opt_ipfw.h> -#include <rtems/bsd/local/opt_ipdn.h> #include <rtems/bsd/local/opt_inet.h> +#include <rtems/bsd/local/opt_inet6.h> #ifndef INET #error IPFIREWALL requires INET. #endif /* INET */ -#endif /* KLD_MODULE */ -#include <rtems/bsd/local/opt_inet6.h> #include <rtems/bsd/sys/param.h> #include <sys/systm.h> @@ -129,8 +126,9 @@ again: args.rule = *((struct ipfw_rule_ref *)(tag+1)); m_tag_delete(*m0, tag); if (args.rule.info & IPFW_ONEPASS) { - SET_HOST_IPLEN(mtod(*m0, struct ip *)); - return 0; + if (mtod(*m0, struct ip *)->ip_v == 4) + SET_HOST_IPLEN(mtod(*m0, struct ip *)); + return (0); } } @@ -151,7 +149,7 @@ again: /* next_hop may be set by ipfw_chk */ if (args.next_hop == NULL) break; /* pass */ -#ifndef IPFIREWALL_FORWARD +#if !defined(IPFIREWALL_FORWARD) || (!defined(INET6) && !defined(INET)) ret = EACCES; #else { @@ -179,7 +177,7 @@ again: if (in_localip(args.next_hop->sin_addr)) (*m0)->m_flags |= M_FASTFWD_OURS; } -#endif +#endif /* IPFIREWALL_FORWARD */ break; case IP_FW_DENY: |