#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)
This commit is contained in:
Cy Schubert 2014-09-22 16:09:18 +00:00
parent 3f3423a0ef
commit 01991654f8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=271972

View File

@ -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);