From: Dave Johnson <djohnson+linux-kernel@sw.starentnetworks.com>
To: Vlad Yasevich <vladislav.yasevich@hp.com>
Cc: lksctp-developers@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
Srinivas Akkipeddi <sakkiped@starentnetworks.com>
Subject: Re: [PATCH] SCTP: IPv4 mapped addr not returned in SCTPv6 accept()
Date: Thu, 26 Jul 2007 15:00:37 -0400 [thread overview]
Message-ID: <18088.61269.5608.925496@zeus.sw.starentnetworks.com> (raw)
In-Reply-To: <46A8E027.10802@hp.com>
Vlad Yasevich writes:
> Can you explain why the sctp_v4 changes are need for the this case?
> I don't see how the code in sctp/protocol.c comes into play for this
> particular bug.
connect() on v6 socket to v4 mapped address will trigger
sctp_v4_to_sk_daddr:
strace:
socket(PF_INET6, SOCK_STREAM, 0x84 /* IPPROTO_??? */) = 3
bind(3, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 128) = 0
connect(3, {sa_family=AF_INET6, sin6_port=htons(33333), inet_pton(AF_INET6, "::ffff:192.168.207.231", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 128) = 0
getsockname(3, {sa_family=AF_INET6, sin6_port=htons(32771), inet_pton(AF_INET6, "::ffff:192.168.207.234", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0
getpeername(3, {sa_family=AF_INET6, sin6_port=htons(33333), inet_pton(AF_INET6, "::ffff:192.168.207.231", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0
stack dump:
[<f8c539de>] sctp_v4_to_sk_daddr+0x3e/0x80 [sctp]
[<f8c5f6c4>] __sctp_connect+0x2a4/0x520 [sctp]
[<f8c61810>] sctp_connect+0x60/0x70 [sctp]
[<c02c4b2c>] inet_dgram_connect+0x4c/0x80
[<c026dbab>] sys_connect+0x8b/0xd0
[<c026e711>] sys_socketcall+0xb1/0x260
[<c0103013>] syscall_call+0x7/0xb
I'm unsure if there is a path to call sctp_v4_to_sk_saddr() but it was
added just to be complete.
v4mapped in sctp_v4_create_accept_sk() probably isn't needed, but
since v4mapped is in sctp_sock not sctp6_sock copying it seems like a
good idea.
--
Dave Johnson
Starent Networks
next prev parent reply other threads:[~2007-07-26 19:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 23:49 Dave Johnson
2007-07-26 17:55 ` Vlad Yasevich
2007-07-26 19:00 ` Dave Johnson [this message]
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 ` [PATCH] SCTP: fix IPv4 addr in SCTPv6 accept()/getpeername() Dave Johnson
2007-08-06 20:48 ` [PATCH] SCTP: IPv4 mapped addr not returned in SCTPv6 accept() 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=18088.61269.5608.925496@zeus.sw.starentnetworks.com \
--to=djohnson+linux-kernel@sw.starentnetworks.com \
--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®