From: Dave Johnson <djohnson+linux-kernel@sw.starentnetworks.com>
To: Vlad Yasevich <vladislav.yasevich@hp.com>
Cc: David Miller <davem@davemloft.net>,
lksctp-developers@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
Srinivas Akkipeddi <sakkiped@starentnetworks.com>
Subject: [PATCH] SCTP: fix IPv4 addr in SCTPv6 accept()/getpeername()
Date: Mon, 6 Aug 2007 16:48:49 -0400 [thread overview]
Message-ID: <18103.35121.595637.783369@zeus.sw.starentnetworks.com> (raw)
In-Reply-To: <46AF3EE5.2070208@hp.com>
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@sw.starentnetworks.com>
Cc: Srinivas Akkipeddi <sakkiped@starentnetworks.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);
next prev parent reply other threads:[~2007-08-06 20:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 23:49 [PATCH] SCTP: IPv4 mapped addr not returned in SCTPv6 accept() Dave Johnson
2007-07-26 17:55 ` Vlad Yasevich
2007-07-26 19:00 ` Dave Johnson
2007-07-26 19:42 ` Vlad Yasevich
2007-07-26 20:44 ` Dave Johnson
2007-07-26 20:49 ` Vlad Yasevich
2007-07-31 0:23 ` David Miller
2007-07-31 13:53 ` Vlad Yasevich
2007-08-06 20:48 ` Dave Johnson [this message]
2007-08-06 20:48 ` Dave Johnson
2007-08-06 20:55 ` Vlad Yasevich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18103.35121.595637.783369@zeus.sw.starentnetworks.com \
--to=djohnson+linux-kernel@sw.starentnetworks.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lksctp-developers@lists.sourceforge.net \
--cc=sakkiped@starentnetworks.com \
--cc=vladislav.yasevich@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®