All of lore.kernel.org
 help / color / mirror / Atom feed
* libxt_conntrack: dump ctdir
@ 2008-11-11 14:18 Jan Engelhardt
  2008-11-12 11:03 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Engelhardt @ 2008-11-11 14:18 UTC (permalink / raw)
  To: kaber; +Cc: Netfilter Developer Mailing List

commit 9de6f0517f5fef7f18f2e4bba392ed68182e3d47
Author: Jan Engelhardt <jengelh@medozas.de>
Date:   Mon Nov 10 18:01:04 2008 +0100

libxt_conntrack: dump ctdir

Sent in as part of a larger private mail by Gáspár Lajos
<swifty@freemail.hu>; I cherry-picked the ctdir part.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 extensions/libxt_conntrack.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

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,

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-12 11:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-11 14:18 libxt_conntrack: dump ctdir Jan Engelhardt
2008-11-12 11:03 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.