Skip to contentSkip to conversation

extensions: icmp: Support info-request/-reply type names

PATCH In review Phil Sutter 1 participant 2 messages Mar 28, 2025 – Apr 23, 2025 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 extensions: icmp: Support info-request/-reply type names

The intended side-effect here is that iptables-translate will accept them too. In nftables, the names are supported since basically day 1.

---
 extensions/libipt_icmp.txlate | 6 ++++++
 extensions/libxt_icmp.h       | 3 +++
 2 files changed, 9 insertions(+)
extensions/libipt_icmp.txlate +6 -0
index e7208d8b874c7..4315875bb1eb7 100644
@@ -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'
extensions/libxt_icmp.h +3 -0
index 7a45b4bd2ec6d..c44aa4b106557 100644
@@ -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 }
Signature · 1 line
2.48.1
author reviewer
#1 lore raw
Quoted 4 lines · Phil Sutter

The intended side-effect here is that iptables-translate will accept them too. In nftables, the names are supported since basically day 1.

Patch applied.