From: shefty Date: Sat, 8 Aug 2009 00:20:44 +0000 (+0000) Subject: winverbs/driver: change status for rejected connections X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=2a48e65589ce4fc589c7fa934ba75bb5397e88de;p=~shefty%2Frdma-win.git winverbs/driver: change status for rejected connections 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 git-svn-id: svn://openib.tc.cornell.edu/gen1@2339 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/core/winverbs/kernel/wv_ep.c b/trunk/core/winverbs/kernel/wv_ep.c index ab7ef666..e19e07a9 100644 --- a/trunk/core/winverbs/kernel/wv_ep.c +++ b/trunk/core/winverbs/kernel/wv_ep.c @@ -525,7 +525,7 @@ static NTSTATUS WvEpIbCmHandler(iba_cm_id *pId, iba_cm_event *pEvent) if (ep->State == WvEpPassiveConnect || ep->State == WvEpActiveConnect) { ep->State = WvEpDisconnected; WvEpSaveReject(ep, &pEvent->data.rej); - WvCompleteRequests(ep->Queue, STATUS_REQUEST_NOT_ACCEPTED); + WvCompleteRequests(ep->Queue, STATUS_CONNECTION_REFUSED); } WdfObjectReleaseLock(ep->Queue); break; @@ -1079,7 +1079,7 @@ static NTSTATUS WvEpIbListenHandler(iba_cm_id *pId, iba_cm_event *pEvent) pId->context = ep; hdr = pEvent->data.req.req.p_pdata; - if (hdr->IpVersion == 4) { + if ((hdr->IpVersion >> 4) == 4) { ep->Attributes.LocalAddress.SockAddr.In.SinFamily = WV_AF_INET; ep->Attributes.LocalAddress.SockAddr.In.SinAddr = hdr->DstAddress.Ip4.Address; ep->Attributes.PeerAddress.SockAddr.In.SinFamily = WV_AF_INET;