o Remove a debug code and restore an accidentally deleted code

in a previous commit.
This commit is contained in:
Maxim Konovalov 2008-10-14 17:59:39 +00:00
parent 92531c02e6
commit 20e58023f4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183890

View File

@ -3855,6 +3855,9 @@ setup_redir_proto(char *spool_buf, int len,
errx(EX_DATAERR, "redirect_proto: buf is too small\n");
}
static void
show_nat(int ac, char **av);
static void
print_nat_config(char *buf) {
struct cfg_nat *n;
@ -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);