aboutsummaryrefslogtreecommitdiff
path: root/sbin/ipfw/ipfw2.c
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2016-08-11 10:10:10 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2016-08-11 10:10:10 +0000
commitd6eb9b024915640956c60f183f7d7b215e54f238 (patch)
treec035bda44cac472afa0929668a370a2a505518ef /sbin/ipfw/ipfw2.c
parent500481733550caebb7ed1c0c7fb2a411d9eb3229 (diff)
downloadsrc-d6eb9b024915640956c60f183f7d7b215e54f238.tar.gz
src-d6eb9b024915640956c60f183f7d7b215e54f238.zip
Restore "nat global" support.
Now zero value of arg1 used to specify "tablearg", use the old "tablearg" value for "nat global". Introduce new macro IP_FW_NAT44_GLOBAL to replace hardcoded magic number to specify "nat global". Also replace 65535 magic number with corresponding macro. Fix typo in comments. PR: 211256 Tested by: Victor Chernov MFC after: 3 days
Notes
Notes: svn path=/head/; revision=303955
Diffstat (limited to 'sbin/ipfw/ipfw2.c')
-rw-r--r--sbin/ipfw/ipfw2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index a02ce39cf3fd..cedefda9468e 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -1583,7 +1583,7 @@ show_static_rule(struct cmdline_opts *co, struct format_opts *fo,
break;
case O_NAT:
- if (cmd->arg1 != 0)
+ if (cmd->arg1 != IP_FW_NAT44_GLOBAL)
bprint_uint_arg(bp, "nat ", cmd->arg1);
else
bprintf(bp, "nat global");
@@ -3776,7 +3776,7 @@ compile_rule(char *av[], uint32_t *rbuf, int *rbufsize, struct tidx *tstate)
action->len = F_INSN_SIZE(ipfw_insn_nat);
CHECK_ACTLEN;
if (*av != NULL && _substrcmp(*av, "global") == 0) {
- action->arg1 = 0;
+ action->arg1 = IP_FW_NAT44_GLOBAL;
av++;
break;
} else