]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
The conntrack match does not print any info for --ctproto, thus
authorPhil Oester <kernel@linuxace.com>
Thu, 17 Nov 2005 13:34:51 +0000 (13:34 +0000)
committerHarald Welte <laforge@gnumonks.org>
Thu, 17 Nov 2005 13:34:51 +0000 (13:34 +0000)
breaking iptables-restore of any rules using this option.  Below
patch adds output and closes bug #398. (Phil Oester)

extensions/libipt_conntrack.c

index 27870b1e834e79320c9a9b6d76a4f993831a2a5a..cdb86c4eeb7051bbe135e85b67427515731195ab 100644 (file)
@@ -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);