Re: [PATCH v2] sctp: Fixup v4mapped behaviour to comply with Sock API
From: David Miller <davem@davemloft.net>
Date: 2014-08-01 04:49:39
Also in:
linux-sctp
From: David Miller <davem@davemloft.net>
Date: 2014-08-01 04:49:39
Also in:
linux-sctp
From: Jason Gunthorpe <redacted> Date: Wed, 30 Jul 2014 12:40:53 -0600
The SCTP socket extensions API document describes the v4mapping option as follows: 8.1.15. Set/Clear IPv4 Mapped Addresses (SCTP_I_WANT_MAPPED_V4_ADDR) This socket option is a Boolean flag which turns on or off the mapping of IPv4 addresses. If this option is turned on, then IPv4 addresses will be mapped to V6 representation. If this option is turned off, then no mapping will be done of V4 addresses and a user will receive both PF_INET6 and PF_INET type addresses on the socket. See [RFC3542] for more details on mapped V6 addresses. This description isn't really in line with what the code does though.
...
Tested bind, getpeername, getsockname, connect, and recvmsg for proper behaviour in v4mapped = 1 and 0 cases. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Tested-by: Jason Gunthorpe <redacted> Signed-off-by: Jason Gunthorpe <redacted>
This has been this way since pre-GIT times, so I'm applying this to net-next, thanks.