]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxtables: Add dccp and ipcomp to xtables_chain_protos
authorPhil Sutter <phil@nwl.cc>
Wed, 10 Jan 2024 22:22:32 +0000 (23:22 +0100)
committerPhil Sutter <phil@nwl.cc>
Tue, 6 Feb 2024 23:25:03 +0000 (00:25 +0100)
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

index ae3ff25a3a8769fbe836d54edd5c929982192fe2..f2fcc5c22fb614aa7d1bd068c07797d8b6e4ac2a 100644 (file)
@@ -2203,6 +2203,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},
 };