From: Phil Oester <kernel@linuxace.com>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] ctproto printing in conntrack match (bug 398)
Date: Sun, 13 Nov 2005 07:18:58 -0800 [thread overview]
Message-ID: <20051113151858.GA25799@linuxace.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 176 bytes --]
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
[-- Attachment #2: patch-ctproto --]
[-- Type: text/plain, Size: 618 bytes --]
diff -ru ipt-orig/extensions/libipt_conntrack.c ipt-new/extensions/libipt_conntrack.c
--- ipt-orig/extensions/libipt_conntrack.c 2005-10-31 11:03:50.000000000 -0800
+++ ipt-new/extensions/libipt_conntrack.c 2005-11-13 07:12:20.000000000 -0800
@@ -442,6 +442,13 @@
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);
next reply other threads:[~2005-11-13 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-13 15:18 Phil Oester [this message]
2005-11-17 13:23 ` [PATCH] ctproto printing in conntrack match (bug 398) Harald Welte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051113151858.GA25799@linuxace.com \
--to=kernel@linuxace.com \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.