summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Oester <kernel@linuxace.com>2005-11-17 13:34:51 +0000
committerHarald Welte <laforge@gnumonks.org>2005-11-17 13:34:51 +0000
commit5a4892b7566fd572a195b12b3a449d0c03125a54 (patch)
tree73a451856fa06300fc0f7cabec8816cbf31fc843
parent0b90564c5082d602d6bc0618f4a285ab45b22c4b (diff)
The conntrack match does not print any info for --ctproto, thus
breaking iptables-restore of any rules using this option. Below patch adds output and closes bug #398. (Phil Oester)
-rw-r--r--extensions/libipt_conntrack.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/extensions/libipt_conntrack.c b/extensions/libipt_conntrack.c
index 27870b1e..cdb86c4e 100644
--- a/extensions/libipt_conntrack.c
+++ b/extensions/libipt_conntrack.c
@@ -442,6 +442,13 @@ matchinfo_print(const struct ipt_ip *ip, const struct ipt_entry_match *match, in
print_state(sinfo->statemask);
}
+ if(sinfo->flags & IPT_CONNTRACK_PROTO) {
+ printf("%sctproto ", optpfx);
+ if (sinfo->invflags & IPT_CONNTRACK_PROTO)
+ printf("! ");
+ printf("%u ", sinfo->tuple[IP_CT_DIR_ORIGINAL].dst.protonum);
+ }
+
if(sinfo->flags & IPT_CONNTRACK_ORIGSRC) {
printf("%sctorigsrc ", optpfx);