OSDN Git Service

RDMA/CMA: Canonize IPv4 on IPV6 sockets properly
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Mon, 20 Apr 2015 20:01:11 +0000 (14:01 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 May 2015 16:55:06 +0000 (09:55 -0700)
commit6a07da8c28e46379bf7eec6f0f8cdc68ebe627c7
tree9c739f7f58a71399202425a032a0451a769d29ff
parentd6e5098a4a4ac0ec566e3a471e92062a938afde0
RDMA/CMA: Canonize IPv4 on IPV6 sockets properly

commit 285214409a9e5fceba2215461b4682b6069d8e77 upstream.

When accepting a new IPv4 connect to an IPv6 socket, the CMA tries to
canonize the address family to IPv4, but does not properly process
the listening sockaddr to get the listening port, and does not properly
set the address family of the canonized sockaddr.

Fixes: e51060f08a61 ("IB: IP address based RDMA connection manager")

Reported-By: Yotam Kenneth <yotamke@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tested-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/cma.c