Skip to contentSkip to conversation

Fix ICMP id type

PATCH Applied Pablo Neira 2 participants 2 messages Nov 8, 2005

Subsystems (2)
lore
Share & tools
lore

Pablo Neira

author maintainer
#0 lore raw

PATCH 6/8 Fix ICMP id type

ICMP_ID is u_int16_t not u_int8_t. Handle this properly.

Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris

ICMP_ID is u_int16_t not u_int8_t. Handle this properly.

net/ipv4/netfilter/ip_conntrack_proto_icmp.c +1 -1
Index: netfilter-2.6.14.git/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
===================================================================
@@ -305,7 +305,7 @@ static int icmp_nfattr_to_tuple(struct n
 	tuple->dst.u.icmp.code =
 			*(u_int8_t *)NFA_DATA(tb[CTA_PROTO_ICMP_CODE-1]);
 	tuple->src.u.icmp.id =
-			*(u_int8_t *)NFA_DATA(tb[CTA_PROTO_ICMP_ID-1]);
+			*(u_int16_t *)NFA_DATA(tb[CTA_PROTO_ICMP_ID-1]);
 
 	return 0;
 }
Applied
#1 lore raw
Quoted 1 line · Pablo Neira

ICMP_ID is u_int16_t not u_int8_t. Handle this properly.

thanks, applied.

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