Skip to contentSkip to conversation

NETFILTER ctnetlink: ICMP ID is not mandatory

PATCH In review Harald Welte 2 participants 2 messages Oct 7, 2005 – Oct 10, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/5 NETFILTER ctnetlink: ICMP ID is not mandatory

Hi Dave,

I think this, too, can still go into 2.6.14, since it is very obvious and actually fixes a bug that prevents us from creating ICMP conntracks from userspace (probably pretty useless feature, but anyway).

Please apply, thanks.

[NETFILTER] ctnetlink: ICMP ID is not mandatory

The ID is only required by ICMP type 8 (echo), so it's not mandatory for all sort of ICMP connections. This patch makes mandatory only the type and the code for ICMP netlink messages.

---
commit cecb8a8d864562529a9798fd401411158ccadf4c
tree b95a5ed7006982af722b0ff60e6b106a698cb536
parent c12716a196b7d9fc9fc64a8c7982c2564c3c998f
author Harald Welte <[email protected]> Fri, 07 Oct 2005 23:36:19 +0200 committer Harald Welte <[email protected]> Fri, 07 Oct 2005 23:36:19 +0200

 net/ipv4/netfilter/ip_conntrack_proto_icmp.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
net/ipv4/netfilter/ip_conntrack_proto_icmp.c +1 -2
@@ -296,8 +296,7 @@ static int icmp_nfattr_to_tuple(struct n
 				struct ip_conntrack_tuple *tuple)
 {
 	if (!tb[CTA_PROTO_ICMP_TYPE-1]
-	    || !tb[CTA_PROTO_ICMP_CODE-1]
-	    || !tb[CTA_PROTO_ICMP_ID-1])
+	    || !tb[CTA_PROTO_ICMP_CODE-1])
 		return -1;
 
 	tuple->dst.u.icmp.type = 
Signature · 5 lines
- Harald Welte <[email protected]>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
maintainer
#1 lore raw

From: Harald Welte <[email protected]>
Date: Sat, 8 Oct 2005 00:21:57 +0200

Quoted 8 lines

[NETFILTER] ctnetlink: ICMP ID is not mandatory

The ID is only required by ICMP type 8 (echo), so it's not mandatory for all sort of ICMP connections. This patch makes mandatory only the type and the code for ICMP netlink messages.

Applied for 2.6.14, thanks.