All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix type of ICMP_ID
@ 2005-11-06  3:00 Krzysztof Oledzki
  2005-11-06  3:09 ` Pablo Neira
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Oledzki @ 2005-11-06  3:00 UTC (permalink / raw)
  To: Pablo Neira; +Cc: netfilter-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 644 bytes --]

Hello,

[NETFILTER] Fix type of ICMP_ID

ICMP_ID is u_int16_t not u_int8_t. Handle this properly.

Signed-out-by: Krzysztof Piotr Oledzki <ole@ans.pl>


--- a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c	2005-11-06 02:17:29.000000000 +0100
+++ b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c	2005-11-06 03:49:51.000000000 +0100
@@ -304,7 +304,7 @@
  	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;
  }


Best regards,


 				Krzysztof Olędzki

[-- Attachment #2: Type: TEXT/PLAIN, Size: 586 bytes --]

[NETFILTER] Fix type of ICMP_ID 

ICMP_ID is u_int16_t not u_int8_t. Handle this properly.

Signed-out-by: Krzysztof Piotr Oledzki <ole@ans.pl>


--- a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c	2005-11-06 02:17:29.000000000 +0100
+++ b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c	2005-11-06 03:49:51.000000000 +0100
@@ -304,7 +304,7 @@
 	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;
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix type of ICMP_ID
  2005-11-06  3:00 [PATCH] Fix type of ICMP_ID Krzysztof Oledzki
@ 2005-11-06  3:09 ` Pablo Neira
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira @ 2005-11-06  3:09 UTC (permalink / raw)
  To: Krzysztof Oledzki; +Cc: netfilter-devel

Krzysztof Oledzki wrote:
> Hello,
> 
> [NETFILTER] Fix type of ICMP_ID
> 
> ICMP_ID is u_int16_t not u_int8_t. Handle this properly.
> 
> Signed-out-by: Krzysztof Piotr Oledzki <ole@ans.pl>

Good catch. Thanks.

-- 
Pablo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-06  3:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-06  3:00 [PATCH] Fix type of ICMP_ID Krzysztof Oledzki
2005-11-06  3:09 ` Pablo Neira

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.