From: Sage Weil Date: Wed, 4 Nov 2009 19:46:35 +0000 (-0800) Subject: ceph: convert port endianness X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f28bcfbe660a3246621a367020054d4f1a179cd9;p=openwrt%2Fstaging%2Fblogic.git ceph: convert port endianness The port is informational only, but we should make it correct. Signed-off-by: Sage Weil --- diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index 6ff44bbddf67..5cc374850d8f 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c @@ -891,9 +891,9 @@ static int addr_port(struct sockaddr_storage *ss) { switch (ss->ss_family) { case AF_INET: - return ((struct sockaddr_in *)ss)->sin_port; + return ntohs(((struct sockaddr_in *)ss)->sin_port); case AF_INET6: - return ((struct sockaddr_in6 *)ss)->sin6_port; + return ntohs(((struct sockaddr_in6 *)ss)->sin6_port); } return 0; }