* [iptables PATCH] extensions: icmp: Support info-request/-reply type names
@ 2025-03-28 16:39 Phil Sutter
2025-04-23 21:09 ` Phil Sutter
0 siblings, 1 reply; 2+ messages in thread
From: Phil Sutter @ 2025-03-28 16:39 UTC (permalink / raw)
To: netfilter-devel
The intended side-effect here is that iptables-translate will accept
them too. In nftables, the names are supported since basically day 1.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
extensions/libipt_icmp.txlate | 6 ++++++
extensions/libxt_icmp.h | 3 +++
2 files changed, 9 insertions(+)
diff --git a/extensions/libipt_icmp.txlate b/extensions/libipt_icmp.txlate
index e7208d8b874c7..4315875bb1eb7 100644
--- a/extensions/libipt_icmp.txlate
+++ b/extensions/libipt_icmp.txlate
@@ -9,3 +9,9 @@ nft 'add rule ip filter INPUT icmp type != destination-unreachable counter accep
iptables-translate -t filter -A INPUT -m icmp --icmp-type any -j ACCEPT
nft 'add rule ip filter INPUT ip protocol icmp counter accept'
+
+iptables-translate -t filter -A INPUT -m icmp --icmp-type info-request -j ACCEPT
+nft 'add rule ip filter INPUT icmp type info-request counter accept'
+
+iptables-translate -t filter -A INPUT -m icmp --icmp-type 16 -j ACCEPT
+nft 'add rule ip filter INPUT icmp type info-reply counter accept'
diff --git a/extensions/libxt_icmp.h b/extensions/libxt_icmp.h
index 7a45b4bd2ec6d..c44aa4b106557 100644
--- a/extensions/libxt_icmp.h
+++ b/extensions/libxt_icmp.h
@@ -52,6 +52,9 @@ static const struct xt_icmp_names {
{ "timestamp-reply", 14, 0, 0xFF },
+ { "info-request", 15, 0, 0xFF },
+ { "info-reply", 16, 0, 0xFF },
+
{ "address-mask-request", 17, 0, 0xFF },
{ "address-mask-reply", 18, 0, 0xFF }
--
2.48.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [iptables PATCH] extensions: icmp: Support info-request/-reply type names
2025-03-28 16:39 [iptables PATCH] extensions: icmp: Support info-request/-reply type names Phil Sutter
@ 2025-04-23 21:09 ` Phil Sutter
0 siblings, 0 replies; 2+ messages in thread
From: Phil Sutter @ 2025-04-23 21:09 UTC (permalink / raw)
To: netfilter-devel
On Fri, Mar 28, 2025 at 05:39:08PM +0100, Phil Sutter wrote:
> The intended side-effect here is that iptables-translate will accept
> them too. In nftables, the names are supported since basically day 1.
>
> Signed-off-by: Phil Sutter <phil@nwl.cc>
Patch applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-23 21:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-28 16:39 [iptables PATCH] extensions: icmp: Support info-request/-reply type names Phil Sutter
2025-04-23 21:09 ` Phil Sutter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox