Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Oct 2014 16:51:02 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r272987 - stable/10/contrib/ipfilter/lib
Message-ID:  <201410121651.s9CGp2Rs049689@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Sun Oct 12 16:51:02 2014
New Revision: 272987
URL: https://svnweb.freebsd.org/changeset/base/272987

Log:
  MFC r271972
  
  Fix ipfilter bug #536 ipnat can try to print rule as dstlist incorrectly.
  
  Obtained from:	ipfilter CVS repo (r1.14), netbsd CVS repo (r1.3)

Modified:
  stable/10/contrib/ipfilter/lib/printnat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/ipfilter/lib/printnat.c
==============================================================================
--- stable/10/contrib/ipfilter/lib/printnat.c	Sun Oct 12 16:48:22 2014	(r272986)
+++ stable/10/contrib/ipfilter/lib/printnat.c	Sun Oct 12 16:51:02 2014	(r272987)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410121651.s9CGp2Rs049689>