[iptables] libxt_conntrack: respect -n option during ruledump

Patrick McHardy netfilter-cvslog-bounces at lists.netfilter.org
Mon Nov 10 17:08:30 CET 2008


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=6b6c096ca56975125edf2aadfd195f23d34df38f
commit 6b6c096ca56975125edf2aadfd195f23d34df38f
Author:     Jan Engelhardt <jengelh at medozas.de>
AuthorDate: Mon Nov 10 17:08:07 2008 +0100
Commit:     Patrick McHardy <kaber at trash.net>
CommitDate: Mon Nov 10 17:08:07 2008 +0100

    libxt_conntrack: respect -n option during ruledump
    
    Reference: http://bugs.debian.org/502548
    
    Signed-off-by: Jan Engelhardt <jengelh at medozas.de>
    Signed-off-by: Patrick McHardy <kaber at trash.net>
       via  6b6c096ca56975125edf2aadfd195f23d34df38f (commit)
      from  d73af64b9d28a5b0309104232c848e8ca8ab6956 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6b6c096ca56975125edf2aadfd195f23d34df38f
Author: Jan Engelhardt <jengelh at medozas.de>
Date:   Mon Nov 10 17:08:07 2008 +0100

    libxt_conntrack: respect -n option during ruledump
    
    Reference: http://bugs.debian.org/502548
    
    Signed-off-by: Jan Engelhardt <jengelh at medozas.de>
    Signed-off-by: Patrick McHardy <kaber at trash.net>

-----------------------------------------------------------------------

 extensions/libxt_conntrack.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
Reference: http://bugs.debian.org/502548

Signed-off-by: Jan Engelhardt <jengelh at medozas.de>
Signed-off-by: Patrick McHardy <kaber at trash.net>

diff --git a/extensions/libxt_conntrack.c b/extensions/libxt_conntrack.c
index 79ed3b8..987e1af 100644
--- a/extensions/libxt_conntrack.c
+++ b/extensions/libxt_conntrack.c
@@ -758,14 +758,20 @@ conntrack_dump_addr(const union nf_inet_addr *addr,
 			printf("anywhere ");
 			return;
 		}
-		printf("%s ", ipaddr_to_anyname(&addr->in));
+		if (numeric)
+			printf("%s ", ipaddr_to_numeric(&addr->in));
+		else
+			printf("%s ", ipaddr_to_anyname(&addr->in));
 	} else if (family == AF_INET6) {
 		if (!numeric && addr->ip6[0] == 0 && addr->ip6[1] == 0 &&
 		    addr->ip6[2] == 0 && addr->ip6[3] == 0) {
 			printf("anywhere ");
 			return;
 		}
-		printf("%s ", ip6addr_to_anyname(&addr->in6));
+		if (numeric)
+			printf("%s ", ip6addr_to_numeric(&addr->in6));
+		else
+			printf("%s ", ip6addr_to_anyname(&addr->in6));
 	}
 }
 



More information about the netfilter-cvslog mailing list