SCTP: IPv4 mapped addr not returned in SCTPv6 accept()
commitb225b884a18a1932db5414abd3ef94a45e4e348e
authorDave Johnson <djohnson+linux-kernel@sw.starentnetworks.com>
Wed, 25 Jul 2007 23:49:29 +0000 (25 19:49 -0400)
committerVlad Yasevich <vladislav.yasevich@hp.com>
Wed, 1 Aug 2007 15:19:06 +0000 (1 11:19 -0400)
treefa4ee9e2f9f5fccae4578e357b62134874da3317
parentcc121fa87a0ce356c23fb4d7358310e747cad8cc
SCTP: IPv4 mapped addr not returned in SCTPv6 accept()

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() as well as a missing check for INET6 socket type in
sctp_v4_to_sk_*addr().

Signed-off-by: Dave Johnson <djohnson@sw.starentnetworks.com>
Cc: Srinivas Akkipeddi <sakkiped@starentnetworks.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
net/sctp/ipv6.c