diff options
author | Rich Fought <Rich.Fought@watchguard.com> | 2012-10-09 15:22:16 -0700 |
---|---|---|
committer | Rich Fought <Rich.Fought@watchguard.com> | 2012-10-09 15:22:16 -0700 |
commit | 547c8f6d50c762d1089785e123bb15e479fe354a (patch) | |
tree | e80ca4de827728d1f0dfccb7d772e151757a1482 | |
parent | d3bec59eb93a64e803307b9a2ce0b7aad9be5555 (diff) | |
download | libnl-547c8f6d50c762d1089785e123bb15e479fe354a.tar.gz |
reinit port numers on tuple dump
-rw-r--r-- | lib/netfilter/exp_obj.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/netfilter/exp_obj.c b/lib/netfilter/exp_obj.c index 61b12e1..69ba324 100644 --- a/lib/netfilter/exp_obj.c +++ b/lib/netfilter/exp_obj.c @@ -184,13 +184,15 @@ static void dump_icmp(struct nl_dump_params *p, struct nfnl_exp *exp, int tuple) static void exp_dump_tuples(struct nfnl_exp *exp, struct nl_dump_params *p) { struct nl_addr *tuple_src, *tuple_dst; - int tuple_sport = 0, tuple_dport = 0; + int tuple_sport, tuple_dport; int i = 0; char buf[64]; for (i = NFNL_EXP_TUPLE_EXPECT; i <= NFNL_EXP_TUPLE_NAT; i++) { tuple_src = NULL; tuple_dst = NULL; + tuple_sport = 0; + tuple_dport = 0; // Test needed for NAT case if (nfnl_exp_test_src(exp, i)) |