diff mbox

[rdma-core,6/7] cmpost: Add missing swap for sin_port

Message ID 1489508474-16664-7-git-send-email-jgunthorpe@obsidianresearch.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jason Gunthorpe March 14, 2017, 4:21 p.m. UTC
It looks like this didn't matter because this sin_port is only used
for resolve_route which doesn't use sin_port data.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
---
 libibcm/examples/cmpost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hefty, Sean March 14, 2017, 5:10 p.m. UTC | #1
Acked-by: Sean Hefty <sean.hefty@intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/libibcm/examples/cmpost.c b/libibcm/examples/cmpost.c
index b8e7d8e0710e6d..b7c95513959390 100644
--- a/libibcm/examples/cmpost.c
+++ b/libibcm/examples/cmpost.c
@@ -632,7 +632,7 @@  static int get_dst_addr(char *dst, struct sockaddr_in *addr_in)
 	}
 
 	*addr_in = *(struct sockaddr_in *) res->ai_addr;
-	addr_in->sin_port = 7471;
+	addr_in->sin_port = htobe16(7471);
 out:
 	freeaddrinfo(res);
 	return ret;