o Remove a debug code and restore an accidentally deleted code
in a previous commit.
This commit is contained in:
parent
92531c02e6
commit
20e58023f4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183890
@ -3855,6 +3855,9 @@ setup_redir_proto(char *spool_buf, int len,
|
|||||||
errx(EX_DATAERR, "redirect_proto: buf is too small\n");
|
errx(EX_DATAERR, "redirect_proto: buf is too small\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
show_nat(int ac, char **av);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_nat_config(char *buf) {
|
print_nat_config(char *buf) {
|
||||||
struct cfg_nat *n;
|
struct cfg_nat *n;
|
||||||
@ -4063,6 +4066,11 @@ config_nat(int ac, char **av)
|
|||||||
i = do_cmd(IP_FW_NAT_CFG, buf, off);
|
i = do_cmd(IP_FW_NAT_CFG, buf, off);
|
||||||
if (i)
|
if (i)
|
||||||
err(1, "setsockopt(%s)", "IP_FW_NAT_CFG");
|
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
|
static void
|
||||||
@ -6054,7 +6062,6 @@ show_nat(int ac, char **av)
|
|||||||
if (do_cmd(cmd, data, (uintptr_t)&nbytes) < 0)
|
if (do_cmd(cmd, data, (uintptr_t)&nbytes) < 0)
|
||||||
err(EX_OSERR, "getsockopt(IP_FW_GET_%s)",
|
err(EX_OSERR, "getsockopt(IP_FW_GET_%s)",
|
||||||
(cmd == IP_FW_NAT_GET_LOG) ? "LOG" : "CONFIG");
|
(cmd == IP_FW_NAT_GET_LOG) ? "LOG" : "CONFIG");
|
||||||
printf("nbytes %b\n", nbytes);
|
|
||||||
}
|
}
|
||||||
if (nbytes == 0)
|
if (nbytes == 0)
|
||||||
exit(0);
|
exit(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user