lkml.org 
[lkml]   [1999]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectTCPv6 connect buglet
Hi all!

Found a buglet in tcp <-> ipv6 binding glue today. Problem manifests
itself when you try to connect to ::0 when you've got no interfaces
up (does oops). Present in at least 2.2.7, 2.2.9, 2.3.2, 2.3.3
(verified). The bug is in tcp_v6_connect. This fixes it:
(obvious when you're staring at it....)


--- linux-2.3.3-old/net/ipv6/tcp_ipv6.c Mon May 3 09:41:33 1999
+++ linux-2.3.3/net/ipv6/tcp_ipv6.c Wed May 26 08:43:55 1999
@@ -551,7 +551,7 @@

failure:
dst_release(xchg(&sk->dst_cache, NULL));
- memcpy(&np->daddr, 0, sizeof(struct in6_addr));
+ memset(&np->daddr, 0, sizeof(struct in6_addr));
sk->daddr = 0;
return err;
}

Strange noone spotted this before. But who is silly enough to try to
connect to ::0 with no interfaces up?? Me :-)

-Lennert Buytenhek <buytenh@dsv.nl>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.028 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site