Signed-off-by: Irena Gannon ([email protected]<mailto:[email protected]>)

This patch makes the server and client agree to work via IPv4.
This way the socket connection that is opened in the beginning to exchange data 
does not fail because one of the sides works through IPv4 and the other through 
IPv6.

Index: D:/Windows/MLNX_VPI/tests/perftest/perftest_resources.c
===================================================================
--- D:/Windows/MLNX_VPI/tests/perftest/perftest_resources.c             
(revision 6544)
+++ D:/Windows/MLNX_VPI/tests/perftest/perftest_resources.c          (revision 
6545)
@@ -359,10 +359,13 @@
                }

                for (t = res; t; t = t->ai_next) {
+                             if (t->ai_family != AF_INET)
+                                             continue;
                                sockfd = socket(t->ai_family, t->ai_socktype, 
t->ai_protocol);
                                if (sockfd != INVALID_SOCKET) {
                                                if (!connect(sockfd, 
t->ai_addr, t->ai_addrlen))
                                                                break;
+                                             printf("Error at socket(): 
%ld\n", WSAGetLastError());
                                                closesocket(sockfd);
                                                sockfd = INVALID_SOCKET;
                                }
@@ -404,6 +407,8 @@
                }

                for (t = res; t; t = t->ai_next) {
+                             if (t->ai_family != AF_INET)
+                                             continue;
                                sockfd = socket(t->ai_family, t->ai_socktype, 
t->ai_protocol);
                                if (sockfd != INVALID_SOCKET) {
                                                n = 1;

Attachment: perftest_resourcesIPv4.patch
Description: perftest_resourcesIPv4.patch

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

Reply via email to