diff options
author | ae <ae@FreeBSD.org> | 2016-08-14 14:50:32 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2016-08-14 14:50:32 +0000 |
commit | e32e56fdfc27f3ec94cd9eeecb1ea9afb971f42e (patch) | |
tree | eb18c36cd3311331a1959eca545e55e9a882084b /sbin | |
parent | 8a8930124f5af5358f4404299f7d4eb1cf7d9a66 (diff) | |
download | FreeBSD-src-e32e56fdfc27f3ec94cd9eeecb1ea9afb971f42e.zip FreeBSD-src-e32e56fdfc27f3ec94cd9eeecb1ea9afb971f42e.tar.gz |
MFC r303955:
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
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipfw/ipfw2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index f64c2be..42b020a 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -1575,7 +1575,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"); @@ -3733,7 +3733,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 |