]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/CMA: Canonize IPv4 on IPV6 sockets properly
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Mon, 20 Apr 2015 20:01:11 +0000 (14:01 -0600)
committerZefan Li <lizefan@huawei.com>
Fri, 18 Sep 2015 01:20:36 +0000 (09:20 +0800)
commitbbb55274896b65b70a30b56243e99ce1a12ca6e8
tree4af8f45eaa515b0a77074ed4986a7e197bb1fdb4
parentdf48a548aef381a3fe0cffcdcd3f6566a94df8ce
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>
[lizf: Backported to 3.4:
 - there's no cma_save_ip4_info() and cma_save_ip6_info(), and instead
   we apply the changes to cma_save_net_info()]
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/infiniband/core/cma.c