winverbs/driver: change status for rejected connections
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sat, 8 Aug 2009 00:20:44 +0000 (00:20 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sat, 8 Aug 2009 00:20:44 +0000 (00:20 +0000)
Complete connection requests with STATUS_CONNECTION_REFUSED rather
than STATUS_REQUEST_NOT_ACCEPTED for rejected connections.  This aligns
the status value with ND.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2339 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/winverbs/kernel/wv_ep.c

index ab7ef66..e19e07a 100644 (file)
@@ -525,7 +525,7 @@ static NTSTATUS WvEpIbCmHandler(iba_cm_id *pId, iba_cm_event *pEvent)
                if (ep->State == WvEpPassiveConnect || ep->State == WvEpActiveConnect) {\r
                        ep->State = WvEpDisconnected;\r
                        WvEpSaveReject(ep, &pEvent->data.rej);\r
-                       WvCompleteRequests(ep->Queue, STATUS_REQUEST_NOT_ACCEPTED);\r
+                       WvCompleteRequests(ep->Queue, STATUS_CONNECTION_REFUSED);\r
                }\r
                WdfObjectReleaseLock(ep->Queue);\r
                break;\r
@@ -1079,7 +1079,7 @@ static NTSTATUS WvEpIbListenHandler(iba_cm_id *pId, iba_cm_event *pEvent)
        pId->context = ep;\r
 \r
        hdr = pEvent->data.req.req.p_pdata;\r
-       if (hdr->IpVersion == 4) {\r
+       if ((hdr->IpVersion >> 4) == 4) {\r
                ep->Attributes.LocalAddress.SockAddr.In.SinFamily = WV_AF_INET;\r
                ep->Attributes.LocalAddress.SockAddr.In.SinAddr = hdr->DstAddress.Ip4.Address;\r
                ep->Attributes.PeerAddress.SockAddr.In.SinFamily = WV_AF_INET;\r