[ofw] winOFED 3.2 RC1 - DAPL/RDMACM unable to connect.

Smith, Stan stan.smith at intel.com
Tue Apr 16 17:08:42 PDT 2013


getaddrinfo("..localmachine", NULL, NULL, &res); used to return the IPv4 address bound to the local IPoIB; in preference to the IPv6 address.
Today, getaddrinfo() returns the IPv6 address, default IPv6 address in some cases.
Use 'hint' struct to qualify which local IPoIB address is desired (IPv4).

Signed-off-by: stan smith stan.smith at intel.com<mailto:stan.smith at intel.com>

--- C:/Users/scsmith/AppData/Local/Temp/util.c-revBASE.svn000.tmp.c               Tue Apr 24 10:35:27 2012
+++ C:/Users/scsmith/Documents/openIB-windows/ofw/gen1/trunk/ulp/dapl2/dapl/openib_common/util.c  Tue Apr 16 15:14:55 2013
@@ -39,7 +39,7 @@
{
               IWVProvider *prov;
               WV_DEVICE_ADDRESS devaddr;
-              struct addrinfo *res, *ai;
+             struct addrinfo *res, hint, *ai;
               HRESULT hr;
               int index;
@@ -54,10 +54,15 @@
                               return hr;
               }
-              hr = getaddrinfo("..localmachine", NULL, NULL, &res);
-              if (hr) {
+             memset(&hint, 0, sizeof hint);
+             hint.ai_flags = AI_PASSIVE;
+             hint.ai_family = AF_INET;
+             hint.ai_socktype = SOCK_STREAM;
+             hint.ai_protocol = IPPROTO_TCP;
+
+             hr = getaddrinfo("..localmachine", NULL, &hint, &res);
+             if (hr)
                               goto release;
-              }
                for (ai = res; ai; ai = ai->ai_next) {
                               hr = prov->lpVtbl->TranslateAddress(prov, ai->ai_addr, &devaddr);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20130417/fe5c5d3f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: util.c.patch
Type: application/octet-stream
Size: 878 bytes
Desc: util.c.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20130417/fe5c5d3f/attachment.obj>


More information about the ofw mailing list