summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw/ipfw2.c
diff options
context:
space:
mode:
authormaxim <maxim@FreeBSD.org>2008-10-14 17:59:39 +0000
committermaxim <maxim@FreeBSD.org>2008-10-14 17:59:39 +0000
commitbe9cccafc21186d9180b1c71790a858f2ef3d398 (patch)
tree0545128030ee59951da99d79f4e94a2e11bf993d /sbin/ipfw/ipfw2.c
parentc9e34ff82a33ac0c781d195d15c5c1ab6bf8e56c (diff)
downloadFreeBSD-src-be9cccafc21186d9180b1c71790a858f2ef3d398.zip
FreeBSD-src-be9cccafc21186d9180b1c71790a858f2ef3d398.tar.gz
o Remove a debug code and restore an accidentally deleted code
in a previous commit.
Diffstat (limited to 'sbin/ipfw/ipfw2.c')
-rw-r--r--sbin/ipfw/ipfw2.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index be4a37c..e382f93 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -3856,6 +3856,9 @@ nospace:
}
static void
+show_nat(int ac, char **av);
+
+static void
print_nat_config(char *buf) {
struct cfg_nat *n;
int i, cnt, flag, off;
@@ -4063,6 +4066,11 @@ config_nat(int ac, char **av)
i = do_cmd(IP_FW_NAT_CFG, buf, off);
if (i)
err(1, "setsockopt(%s)", "IP_FW_NAT_CFG");
+
+ /* After every modification, we show the resultant rule. */
+ int _ac = 3;
+ char *_av[] = {"show", "config", id};
+ show_nat(_ac, _av);
}
static void
@@ -6054,7 +6062,6 @@ show_nat(int ac, char **av)
if (do_cmd(cmd, data, (uintptr_t)&nbytes) < 0)
err(EX_OSERR, "getsockopt(IP_FW_GET_%s)",
(cmd == IP_FW_NAT_GET_LOG) ? "LOG" : "CONFIG");
- printf("nbytes %b\n", nbytes);
}
if (nbytes == 0)
exit(0);
OpenPOWER on IntegriCloud