summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_fw2.c
diff options
context:
space:
mode:
authorpiso <piso@FreeBSD.org>2008-03-17 23:02:56 +0000
committerpiso <piso@FreeBSD.org>2008-03-17 23:02:56 +0000
commit965a19847a23893c3eed9b5702a142e657fc79b3 (patch)
treea3e5a696b60619eca7363927e480549cca0c806b /sys/netinet/ip_fw2.c
parentc04bb048f627b5ef992c77aced92b491f4c8974a (diff)
downloadFreeBSD-src-965a19847a23893c3eed9b5702a142e657fc79b3.zip
FreeBSD-src-965a19847a23893c3eed9b5702a142e657fc79b3.tar.gz
Don't cache ptr to nat rule in case of tablearg argument.
Bug spotted by: Dyadchenko Mihail
Diffstat (limited to 'sys/netinet/ip_fw2.c')
-rw-r--r--sys/netinet/ip_fw2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index 67be4a9..a3347e5 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -3297,7 +3297,8 @@ check_body:
if (t == NULL) {
retval = IP_FW_DENY;
goto done;
- } else
+ }
+ if (cmd->arg1 != IP_FW_TABLEARG)
((ipfw_insn_nat *)cmd)->nat = t;
}
retval = ipfw_nat_ptr(args, t, m);
OpenPOWER on IntegriCloud