[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18103.35121.595637.783369@zeus.sw.starentnetworks.com>
Date: Mon, 6 Aug 2007 16:48:49 -0400
From: Dave Johnson <djohnson+linux-kernel@...starentnetworks.com>
To: Vlad Yasevich <vladislav.yasevich@...com>
Cc: David Miller <davem@...emloft.net>,
lksctp-developers@...ts.sourceforge.net,
linux-kernel@...r.kernel.org,
Srinivas Akkipeddi <sakkiped@...rentnetworks.com>
Subject: [PATCH] SCTP: fix IPv4 addr in SCTPv6 accept()/getpeername()
An accept() call on a SCTPv6 socket that returns due to connection of
a IPv4 mapped peer will fill out the 'struct sockaddr' with a zero
IPv6 address instead of the IPv4 mapped address of the peer.
This is due to the v4mapped flag not getting copied into the new
socket on accept().
Signed-off-by: Dave Johnson <djohnson@...starentnetworks.com>
Cc: Srinivas Akkipeddi <sakkiped@...rentnetworks.com>
===== net/sctp/ipv6.c 1.108 vs edited =====
--- 1.108/net/sctp/ipv6.c 2007-07-05 20:40:15 -04:00
+++ edited/net/sctp/ipv6.c 2007-07-25 16:30:41 -04:00
@@ -641,6 +641,8 @@
newsctp6sk = (struct sctp6_sock *)newsk;
inet_sk(newsk)->pinet6 = &newsctp6sk->inet6;
+ sctp_sk(newsk)->v4mapped = sctp_sk(sk)->v4mapped;
+
newinet = inet_sk(newsk);
newnp = inet6_sk(newsk);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists