diff options
author | cy <cy@FreeBSD.org> | 2014-09-22 16:09:18 +0000 |
---|---|---|
committer | cy <cy@FreeBSD.org> | 2014-09-22 16:09:18 +0000 |
commit | dcdb35188c35497e54e43cbe327ac84f0e36e39f (patch) | |
tree | 6018688a7c440f1c0e04d4af0f4298d85b3f0ac5 /contrib/ipfilter/lib/printnat.c | |
parent | ac03311bc509bc87b49989ccb82532a152e4ef67 (diff) | |
download | FreeBSD-src-dcdb35188c35497e54e43cbe327ac84f0e36e39f.zip FreeBSD-src-dcdb35188c35497e54e43cbe327ac84f0e36e39f.tar.gz |
#536 ipnat can try to print rule as dstlist incorrectly
Approved by: glebius (mentor)
Obtained from: ipfilter CVS repo (r1.14), netbsd CVS repo (r1.3)
Diffstat (limited to 'contrib/ipfilter/lib/printnat.c')
-rw-r--r-- | contrib/ipfilter/lib/printnat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/ipfilter/lib/printnat.c b/contrib/ipfilter/lib/printnat.c index 37a7e12..a94d4ee 100644 --- a/contrib/ipfilter/lib/printnat.c +++ b/contrib/ipfilter/lib/printnat.c @@ -153,7 +153,8 @@ printnat(np, opts) } else if (np->in_redir & NAT_REWRITE) { PRINTF(" -> src "); - if (np->in_nsrc.na_type == IPLT_DSTLIST) { + if (np->in_nsrc.na_atype == FRI_LOOKUP && + np->in_nsrc.na_type == IPLT_DSTLIST) { PRINTF("dstlist/"); if (np->in_nsrc.na_subtype == 0) PRINTF("%d", np->in_nsrc.na_num); @@ -174,7 +175,8 @@ printnat(np, opts) } } PRINTF(" dst "); - if (np->in_ndst.na_type == IPLT_DSTLIST) { + if (np->in_ndst.na_atype == FRI_LOOKUP && + np->in_ndst.na_type == IPLT_DSTLIST) { PRINTF("dstlist/"); if (np->in_ndst.na_subtype == 0) PRINTF("%d", np->in_nsrc.na_num); |