RDMA/cma: Listen on specific address family
authorSean Hefty <sean.hefty@intel.com>
Thu, 14 Jun 2012 20:31:39 +0000 (20:31 +0000)
committerRoland Dreier <roland@purestorage.com>
Mon, 9 Jul 2012 01:02:24 +0000 (18:02 -0700)
commit406b6a25f85271397739a7e9f5af1df665b8a0d0
tree92e5b43df5689594432bcc0aec8a28861218919f
parent5b0ec991c0576c54db75803fbcb0ef5bebfa0828
RDMA/cma: Listen on specific address family

The rdma_cm maps IPv4 and IPv6 addresses to the same service ID.  This
prevents apps from listening only for IPv4 or IPv6 addresses.  It also
results in an app binding to an IPv4 address receiving connection
requests for an IPv6 address.

Change this to match socket behavior: restrict listens on IPv4
addresses to only IPv4 addresses, and if a listen is on an IPv6
address, allow it to receive either IPv4 or IPv6 addresses, based on
its address family binding.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/core/cma.c