reapply overwritten commit 2340
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 10 Aug 2009 18:52:32 +0000 (18:52 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 10 Aug 2009 18:52:32 +0000 (18:52 +0000)
not sure what happened, but commit 2340 was lost

The IP version number is in the upper 4 bits.  It is set correctly, but not read out correctly.

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2349 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/winverbs/kernel/wv_ep.c

index 72f0be8..e19e07a 100644 (file)
@@ -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