Here is a <not tested> patch that I think removes support for binding
RFC PATCH 1/1 Here is a <not tested> patch that I think removes support for binding
to 127.0.0.1. Sean will this work?
If we agree to do this for 2.6.33, then I'll build/test this and resubmit.
----
rdma/cma: Disallow binding rdma endpoints to 127.0.0.1.
Currently this functionality breaks openmpi. Once openmpi is fixed to correctly ignore 127.0.0.1 as a valid external rdma address, we can re-enable this functionality.
Signed-off-by Steve Wise <[email protected]>
---
drivers/infiniband/core/cma.c | 16 ++-------------- 1 files changed, 2 insertions(+), 14 deletions(-)
drivers/infiniband/core/cma.c +2 -14
@@ -628,19 +628,9 @@ static inline int cma_zero_addr(struct sockaddr *addr) } } -static inline int cma_loopback_addr (struct sockaddr *addr) -{ -if (addr->sa_family ==AF_INET ) -return ipv4_is_loopback ( - ((struct sockaddr_in *) addr)->sin_addr.s_addr); -else -return ipv6_addr_loopback ( - &((struct sockaddr_in6 *) addr)->sin6_addr); -} -static inline int cma_any_addr (struct sockaddr *addr) { -return cma_zero_addr (addr) ||cma_loopback_addr (addr); +return cma_zero_addr (addr); }static inline __be16 cma_port (struct sockaddr *addr)
@@ -2115,9 +2105,7 @@ int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr *addr)if (ret) goto err1; -if (cma_loopback_addr (addr)) { - ret =cma_bind_loopback (id_priv); - }else if (!cma_zero_addr (addr)) { +if (!cma_zero_addr (addr)) { ret =rdma_translate_ip (addr, &id->route.addr.dev_addr);if (ret) goto err1;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html