Colliding with RDS port of 18634. rdma_cm can return
either EADDRINUSE or EADDRNOTAVAIL if the bind fails.
Add check for either and return proper DAT_CONN_QUAL_IN_USE.

Signed-off-by: Arlin Davis <[email protected]>
---
 dapl/openib_cma/cm.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dapl/openib_cma/cm.c b/dapl/openib_cma/cm.c
index 40634b2..c52e716 100644
--- a/dapl/openib_cma/cm.c
+++ b/dapl/openib_cma/cm.c
@@ -694,7 +694,8 @@ dapls_ib_setup_conn_listener(IN DAPL_IA * ia_ptr,
        ((struct sockaddr_in *)&addr)->sin_port = SID_TO_PORT(ServiceID);
 
        if (rdma_bind_addr(conn->cm_id, (struct sockaddr *)&addr)) {
-               if ((errno == EBUSY) || (errno == EADDRINUSE))
+               if ((errno == EBUSY) || (errno == EADDRINUSE) || 
+                   (errno == EADDRNOTAVAIL))
                        dat_status = DAT_CONN_QUAL_IN_USE;
                else
                        dat_status =
@@ -717,7 +718,8 @@ dapls_ib_setup_conn_listener(IN DAPL_IA * ia_ptr,
 
        if (rdma_listen(conn->cm_id, 0)) {      /* max cma backlog */
 
-               if ((errno == EBUSY) || (errno == EADDRINUSE))
+               if ((errno == EBUSY) || (errno == EADDRINUSE) ||
+                   (errno == EADDRNOTAVAIL))
                        dat_status = DAT_CONN_QUAL_IN_USE;
                else
                        dat_status =
-- 
1.5.2.5

_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to