From 67a1d1b5c7265fd2bbdf932ef65c32efddea2b5a Mon Sep 17 00:00:00 2001 From: shefty Date: Mon, 10 Aug 2009 18:49:25 +0000 Subject: [PATCH] winverbs/driver: fix check for IP version (reapply overwritten commit) The IP version is in the upper 4 bits of an 8 bit field. It is set correctly, but not ready out correctly. The result is that an IPv4 address reported to user space is listed as an IPv6 address instead. Signed-off-by: Sean Hefty git-svn-id: svn://openib.tc.cornell.edu/gen1@2348 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- branches/winverbs/core/winverbs/kernel/wv_ep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/branches/winverbs/core/winverbs/kernel/wv_ep.c b/branches/winverbs/core/winverbs/kernel/wv_ep.c index 72f0be88..e19e07a9 100644 --- a/branches/winverbs/core/winverbs/kernel/wv_ep.c +++ b/branches/winverbs/core/winverbs/kernel/wv_ep.c @@ -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; -- 2.41.0