Subject: Re: [PATCH] [IPV6]: bug 10437: MSG_ERRQUEUE messages do not pass to connected raw sockets

From: Dmitry Butskoy <[email-masked]>
Date: Fri, 11 Apr 2008 15:39:52 +0400

YOSHIFUJI Hideaki / 吉藤英明 wrote:
> In article <[email-masked]> (at Fri, 11 Apr 2008 15:02:52 +0400), Dmitry Butskoy <[email-masked]> says:
>
>   
>> Andrew Morton wrote:
>>     
>>> Dmitry, I'd suggest that you send the patch via email to
>>> [email-masked] 
>>>       
>> OK, resend
>>
>>     
>>> and to YOSHIFUJI Hideaki <[email-masked]>.
>>>   
>>>       
>> It seems that I cannot reach this e-mail address from my country :( (some terrible antispam?)
>>
>>
>>
>> The small patch to fix bug #10437 .
>>
>> See description of the bug at 
>> http://bugzilla.kernel.org/show_bug.cgi?id=10437
>>     
>
> I'm going to agree.
>
> Your patch is for 2.6.24-stable
> Can you provide patches for linux-2.6.25-rc, please?
>   

Attached.

Could it be fixed for, say 2.6.24.5, as well?

If it is possible, please, report me at what next stable kernel version 
it will appear to be fixed...

~buc

diff -Nrbu ipv6/raw.c ipv6.OK/raw.c
--- ipv6/raw.c	2008-04-01 23:44:26.000000000 +0400
+++ ipv6.OK/raw.c	2008-04-11 15:33:30.000000000 +0400
@@ -372,8 +372,8 @@
 	read_lock(&raw_v6_hashinfo.lock);
 	sk = sk_head(&raw_v6_hashinfo.ht[hash]);
 	if (sk != NULL) {
-		saddr = &ipv6_hdr(skb)->saddr;
-		daddr = &ipv6_hdr(skb)->daddr;
+		saddr = &((struct ipv6hdr *)skb->data)->saddr;
+		daddr = &((struct ipv6hdr *)skb->data)->daddr;
 		net = skb->dev->nd_net;
 
 		while ((sk = __raw_v6_lookup(net, sk, nexthdr, saddr, daddr,