[iptables] libxt_conntrack: dump ctdir

Patrick McHardy netfilter-cvslog-bounces at lists.netfilter.org
Wed Nov 12 12:03:42 CET 2008


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=c7fc1dae1e8f8a5fe2ad4eac4bdd1f3c59d8c975
commit c7fc1dae1e8f8a5fe2ad4eac4bdd1f3c59d8c975
Author:     Jan Engelhardt <jengelh at medozas.de>
AuthorDate: Wed Nov 12 12:03:25 2008 +0100
Commit:     Patrick McHardy <kaber at trash.net>
CommitDate: Wed Nov 12 12:03:25 2008 +0100

    libxt_conntrack: dump ctdir
    
    Sent in as part of a larger private mail by Gáspár Lajos
    <swifty at freemail.hu>; I cherry-picked the ctdir part.
    
    Signed-off-by: Jan Engelhardt <jengelh at medozas.de>
    Signed-off-by: Patrick McHardy <kaber at trash.net>
       via  c7fc1dae1e8f8a5fe2ad4eac4bdd1f3c59d8c975 (commit)
      from  175f451104532f3054b1824695d16a4ee1d8ea34 (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 c7fc1dae1e8f8a5fe2ad4eac4bdd1f3c59d8c975
Author: Jan Engelhardt <jengelh at medozas.de>
Date:   Wed Nov 12 12:03:25 2008 +0100

    libxt_conntrack: dump ctdir
    
    Sent in as part of a larger private mail by Gáspár Lajos
    <swifty at freemail.hu>; I cherry-picked the ctdir part.
    
    Signed-off-by: Jan Engelhardt <jengelh at medozas.de>
    Signed-off-by: Patrick McHardy <kaber at trash.net>

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

 extensions/libxt_conntrack.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
Sent in as part of a larger private mail by Gáspár Lajos
<swifty at freemail.hu>; I cherry-picked the ctdir part.

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 987e1af..1e5f141 100644
--- a/extensions/libxt_conntrack.c
+++ b/extensions/libxt_conntrack.c
@@ -879,6 +879,14 @@ matchinfo_print(const void *ip, const struct xt_entry_match *match, int numeric,
         	else
                 	printf("%lu:%lu ", sinfo->expires_min, sinfo->expires_max);
 	}
+
+	if (sinfo->flags & XT_CONNTRACK_DIRECTION) {
+		if (sinfo->invflags & XT_CONNTRACK_DIRECTION)
+			printf("%sctdir REPLY", optpfx);
+		else
+			printf("%sctdir ORIGINAL", optpfx);
+	}
+
 }
 
 static void
@@ -976,6 +984,13 @@ conntrack_dump(const struct xt_conntrack_mtinfo1 *info, const char *prefix,
 			printf("%u:%u ", (unsigned int)info->expires_min,
 			       (unsigned int)info->expires_max);
 	}
+
+	if (info->match_flags & XT_CONNTRACK_DIRECTION) {
+		if (info->invert_flags & XT_CONNTRACK_DIRECTION)
+			printf("%sctdir REPLY", prefix);
+		else
+			printf("%sctdir ORIGINAL", prefix);
+	}
 }
 
 static void conntrack_print(const void *ip, const struct xt_entry_match *match,



More information about the netfilter-cvslog mailing list