aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorPaolo Pisati <piso@FreeBSD.org>2008-02-18 20:26:34 +0000
committerPaolo Pisati <piso@FreeBSD.org>2008-02-18 20:26:34 +0000
commitc879f6ecd77ca70762f2a5a115ee7f7f56a02d5c (patch)
tree38f3c1be039d5f51345041b0cb6c2ede65dee149 /sbin
parent2912059a8548d24fbbee95bc80ec4af6e24d7246 (diff)
Notes
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/ipfw2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 1366ab2e20ff..41330e6c804a 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -5924,7 +5924,7 @@ show_nat(int ac, char **av) {
struct cfg_nat *n;
struct cfg_redir *e;
int cmd, i, nbytes, do_cfg, do_rule, frule, lrule, nalloc, size;
- int nat_cnt, r;
+ int nat_cnt, redir_cnt, r;
uint8_t *data, *p;
char **lav, *endptr;
@@ -5971,11 +5971,11 @@ show_nat(int ac, char **av) {
}
print_nat_config(&data[i]);
i += sizeof(struct cfg_nat);
- e = (struct cfg_redir *)&data[i];
- if (e->mode == REDIR_ADDR || e->mode == REDIR_PORT ||
- e->mode == REDIR_PROTO)
+ for (redir_cnt = 0; redir_cnt < n->redir_cnt; redir_cnt++) {
+ e = (struct cfg_redir *)&data[i];
i += sizeof(struct cfg_redir) + e->spool_cnt *
sizeof(struct cfg_spool);
+ }
}
} else {
for (i = 0; 1; i += LIBALIAS_BUF_SIZE + sizeof(int)) {