summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2010-07-27 14:26:34 +0000
committerglebius <glebius@FreeBSD.org>2010-07-27 14:26:34 +0000
commite3569a1c3951fe7852b737e7bcb7541bf8d96f9e (patch)
tree33344b9995145e259cc7491dfdf3d32331aee776
parent09765cbf800583d02375ab562b000361b2a0230c (diff)
downloadFreeBSD-src-e3569a1c3951fe7852b737e7bcb7541bf8d96f9e.zip
FreeBSD-src-e3569a1c3951fe7852b737e7bcb7541bf8d96f9e.tar.gz
Fix operation of "netgraph" action in conjunction with the
net.inet.ip.fw.one_pass sysctl. The "ngtee" action is still broken. PR: kern/148885 Submitted by: Nickolay Dudorov <nnd mail.nsk.ru>
-rw-r--r--sys/netgraph/ng_ipfw.c3
-rw-r--r--sys/netinet/ipfw/ip_fw2.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/sys/netgraph/ng_ipfw.c b/sys/netgraph/ng_ipfw.c
index 8493883..68bd89c 100644
--- a/sys/netgraph/ng_ipfw.c
+++ b/sys/netgraph/ng_ipfw.c
@@ -287,7 +287,8 @@ ng_ipfw_input(struct mbuf **m0, int dir, struct ip_fw_args *fwa, int tee)
}
r = (struct ipfw_rule_ref *)(tag + 1);
*r = fwa->rule;
- r->info = dir ? IPFW_INFO_IN : IPFW_INFO_OUT;
+ r->info &= IPFW_ONEPASS; /* keep this info */
+ r->info |= dir ? IPFW_INFO_IN : IPFW_INFO_OUT;
m_tag_prepend(m, tag);
} else
diff --git a/sys/netinet/ipfw/ip_fw2.c b/sys/netinet/ipfw/ip_fw2.c
index abbe752..c291089 100644
--- a/sys/netinet/ipfw/ip_fw2.c
+++ b/sys/netinet/ipfw/ip_fw2.c
@@ -2084,6 +2084,8 @@ do { \
set_match(args, f_pos, chain);
args->rule.info = (cmd->arg1 == IP_FW_TABLEARG) ?
tablearg : cmd->arg1;
+ if (V_fw_one_pass)
+ args->rule.info |= IPFW_ONEPASS;
retval = (cmd->opcode == O_NETGRAPH) ?
IP_FW_NETGRAPH : IP_FW_NGTEE;
l = 0; /* exit inner loop */
OpenPOWER on IntegriCloud