From: Phil Sutter <phil@nwl.cc>
To: netfilter-devel@vger.kernel.org
Cc: Florian Westphal <fw@strlen.de>
Subject: [iptables PATCH v2 2/3] libxtables: Add dccp and ipcomp to xtables_chain_protos
Date: Wed, 10 Jan 2024 23:41:35 +0100 [thread overview]
Message-ID: <20240110224136.11211-3-phil@nwl.cc> (raw)
In-Reply-To: <20240110224136.11211-1-phil@nwl.cc>
There are "protocol extensions" for both just like with TCP or UDP.
Caching their values allows for implicit extension lookup after '-p'
flag, for instance:
| iptables -A FORWARD -p dccp --dport 1
| iptables -A FORWARD -p ipcomp --ipcompspi 18
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
libxtables/xtables.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libxtables/xtables.c b/libxtables/xtables.c
index b4339e8d31275..38b50f7aca93e 100644
--- a/libxtables/xtables.c
+++ b/libxtables/xtables.c
@@ -2201,6 +2201,8 @@ const struct xtables_pprot xtables_chain_protos[] = {
{"mobility-header", IPPROTO_MH},
{"ipv6-mh", IPPROTO_MH},
{"mh", IPPROTO_MH},
+ {"dccp", IPPROTO_DCCP},
+ {"ipcomp", IPPROTO_COMP},
{"all", 0},
{NULL},
};
--
2.43.0
next prev parent reply other threads:[~2024-01-10 22:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 22:41 [iptables PATCH v2 0/3] iptables-save: Avoid /etc/protocols lookups Phil Sutter
2024-01-10 22:41 ` [iptables PATCH v2 1/3] Revert "xshared: Print protocol numbers if --numeric was given" Phil Sutter
2024-01-10 22:41 ` Phil Sutter [this message]
2024-01-10 22:41 ` [iptables PATCH v2 3/3] iptables-save: Avoid /etc/protocols lookups Phil Sutter
2024-02-06 23:25 ` [iptables PATCH v2 0/3] " Phil Sutter
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=20240110224136.11211-3-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).