Bug 7621 - 2.6.19 breaks IPv6
Summary: 2.6.19 breaks IPv6
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Networking
Classification: Unclassified
Component: IPV6 (show other bugs)
Hardware: i386 Linux
: P2 high
Assignee: Hideaki YOSHIFUJI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-02 11:20 UTC by Jasmin Buchert
Modified: 2006-12-08 14:38 UTC (History)
0 users

See Also:
Kernel Version: 2.6.19
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Jasmin Buchert 2006-12-02 11:20:58 UTC
Vanille 2.6.19 oops'es at boot. With the patch from 
http://marc.theaimsgroup.com/?l=linux-kernel&m=116485303623545&w=2 it boots 
but IPv6 stopps working. I can't ping/traceroute any host. Network setup has 
not changed.
Comment 1 Andrew Morton 2006-12-02 18:16:51 UTC
> On Sat, 2 Dec 2006 11:23:54 -0800 bugme-daemon@bugzilla.kernel.org wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=7621
> 
>            Summary: 2.6.19 breaks IPv6
>     Kernel Version: 2.6.19
>             Status: NEW
>           Severity: high
>              Owner: yoshfuji@linux-ipv6.org
>          Submitter: jasmin-bugs@pacifica.ch
> 
> 
> Vanille 2.6.19 oops'es at boot. With the patch from 
> http://marc.theaimsgroup.com/?l=linux-kernel&m=116485303623545&w=2 it boots 
> but IPv6 stopps working. I can't ping/traceroute any host. Network setup has 
> not changed.
> 
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.

Comment 2 Anonymous Emailer 2006-12-02 20:59:18 UTC
Reply-To: davem@davemloft.net

From: Andrew Morton <akpm@osdl.org>
Date: Sat, 2 Dec 2006 19:20:09 -0800

> > On Sat, 2 Dec 2006 11:23:54 -0800 bugme-daemon@bugzilla.kernel.org wrote:
> > http://bugzilla.kernel.org/show_bug.cgi?id=7621
> > 
> >            Summary: 2.6.19 breaks IPv6
> >     Kernel Version: 2.6.19
> >             Status: NEW
> >           Severity: high
> >              Owner: yoshfuji@linux-ipv6.org
> >          Submitter: jasmin-bugs@pacifica.ch
> > 
> > 
> > Vanille 2.6.19 oops'es at boot. With the patch from 
> > http://marc.theaimsgroup.com/?l=linux-kernel&m=116485303623545&w=2 it boots 
> > but IPv6 stopps working. I can't ping/traceroute any host. Network setup has 
> > not changed.
> > 
> > ------- You are receiving this mail because: -------
> > You are on the CC list for the bug, or are watching someone who is.

As YOSHIFUJI Hideaki noticed, changing 'len' influences the
argument to ip6_nd_hdr(), which is not a side effect we wanted.

We only wanted the allocation length to be increased by
sizeof(struct ipv6hdr).

This is the correct version of the fix.

commit 6e38433357e2381bb278a418fb7e2fd201475101
Author: David S. Miller <davem@sunset.davemloft.net>
Date:   Sat Dec 2 21:00:06 2006 -0800

    [IPV6] NDISC: Calculate packet length correctly for allocation.
    
    MAX_HEADER does not include the ipv6 header length in it,
    so we need to add it in explicitly.
    
    With help from YOSHIFUJI Hideaki.
    
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 73eb8c3..89d527e 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -472,7 +472,9 @@ static void ndisc_send_na(struct net_dev
 			inc_opt = 0;
 	}
 
-	skb = sock_alloc_send_skb(sk, MAX_HEADER + len + LL_RESERVED_SPACE(dev),
+	skb = sock_alloc_send_skb(sk,
+				  (MAX_HEADER + sizeof(struct ipv6hdr) +
+				   len + LL_RESERVED_SPACE(dev)),
 				  1, &err);
 
 	if (skb == NULL) {
@@ -561,7 +563,9 @@ void ndisc_send_ns(struct net_device *de
 	if (send_llinfo)
 		len += ndisc_opt_addr_space(dev);
 
-	skb = sock_alloc_send_skb(sk, MAX_HEADER + len + LL_RESERVED_SPACE(dev),
+	skb = sock_alloc_send_skb(sk,
+				  (MAX_HEADER + sizeof(struct ipv6hdr) +
+				   len + LL_RESERVED_SPACE(dev)),
 				  1, &err);
 	if (skb == NULL) {
 		ND_PRINTK0(KERN_ERR
@@ -636,7 +640,9 @@ void ndisc_send_rs(struct net_device *de
 	if (dev->addr_len)
 		len += ndisc_opt_addr_space(dev);
 
-        skb = sock_alloc_send_skb(sk, MAX_HEADER + len + LL_RESERVED_SPACE(dev),
+        skb = sock_alloc_send_skb(sk,
+				  (MAX_HEADER + sizeof(struct ipv6hdr) +
+				   len + LL_RESERVED_SPACE(dev)),
 				  1, &err);
 	if (skb == NULL) {
 		ND_PRINTK0(KERN_ERR
@@ -1446,7 +1452,9 @@ void ndisc_send_redirect(struct sk_buff 
 	rd_len &= ~0x7;
 	len += rd_len;
 
-	buff = sock_alloc_send_skb(sk, MAX_HEADER + len + LL_RESERVED_SPACE(dev),
+	buff = sock_alloc_send_skb(sk,
+				   (MAX_HEADER + sizeof(struct ipv6hdr) +
+				    len + LL_RESERVED_SPACE(dev)),
 				   1, &err);
 	if (buff == NULL) {
 		ND_PRINTK0(KERN_ERR

Comment 3 Jasmin Buchert 2006-12-03 08:42:37 UTC
Now it works! Thanks :)

Note You need to log in before you can comment on or make changes to this bug.