* [PATCH resend] rdma/cma: Disallow binding rdma endpoints to 127.0.0.1.
@ 2010-02-08 22:04 Steve Wise
0 siblings, 0 replies; only message in thread
From: Steve Wise @ 2010-02-08 22:04 UTC (permalink / raw)
To: rdreier-FYB4Gu1CFyUAvxtiuMwx3w, sean.hefty-ral2JQCrhuEAvxtiuMwx3w
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
ewg-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5
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 <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
drivers/infiniband/core/cma.c | 16 ++--------------
1 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index cc9b594..cd3d351 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-08 22:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-08 22:04 [PATCH resend] rdma/cma: Disallow binding rdma endpoints to 127.0.0.1 Steve Wise
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox