Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ipf/dist/lib #536 ipnat can try to print rule a...



details:   https://anonhg.NetBSD.org/src/rev/eae0ab2567eb
branches:  trunk
changeset: 330209:eae0ab2567eb
user:      darrenr <darrenr%NetBSD.org@localhost>
date:      Sun Jun 29 08:51:01 2014 +0000

description:
#536 ipnat can try to print rule as dstlist incorrectly

diffstat:

 external/bsd/ipf/dist/lib/printnat.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 2446f382cf1e -r eae0ab2567eb external/bsd/ipf/dist/lib/printnat.c
--- a/external/bsd/ipf/dist/lib/printnat.c      Sun Jun 29 05:20:15 2014 +0000
+++ b/external/bsd/ipf/dist/lib/printnat.c      Sun Jun 29 08:51:01 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: printnat.c,v 1.2 2012/07/22 14:27:37 darrenr Exp $     */
+/*     $NetBSD: printnat.c,v 1.3 2014/06/29 08:51:01 darrenr Exp $     */
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -153,7 +153,8 @@
 
        } 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 @@
                        }
                }
                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);



Home | Main Index | Thread Index | Old Index