]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
Refresh of reuseaddr
authorSean Hefty <sean.hefty@intel.com>
Thu, 10 May 2012 18:28:17 +0000 (11:28 -0700)
committerSean Hefty <sean.hefty@intel.com>
Thu, 10 May 2012 18:28:17 +0000 (11:28 -0700)
src/rsocket.c

index 2ffde9bb224e434de64049963c1202f0ac6c8320..de0ec3e50f47d88fd649e077bf5366d43e88a4b0 100644 (file)
@@ -1621,7 +1621,9 @@ int rsetsockopt(int socket, int level, int optname,
                        ret = rdma_set_option(rs->cm_id, RDMA_OPTION_ID,
                                              RDMA_OPTION_ID_REUSEADDR,
                                              (void *) optval, optlen);
-                       if (ret && errno == ENOSYS)
+                       if (ret && ((errno == ENOSYS) || ((rs->state != rs_init) &&
+                           rs->cm_id->context &&
+                           (rs->cm_id->verbs->device->transport_type == IBV_TRANSPORT_IB))))
                                ret = 0;
                        opt_on = *(int *) optval;
                        break;