summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-04 19:46:35 (GMT)
committerSage Weil <sage@newdream.net>2009-11-05 00:36:12 (GMT)
commitf28bcfbe660a3246621a367020054d4f1a179cd9 (patch)
tree9dfadb9a1ab29fa42b41dc2a8098e5128b7d3b34
parent6a18be16f7513ea8a4923c161ce073987932cbdb (diff)
downloadlinux-fsl-qoriq-f28bcfbe660a3246621a367020054d4f1a179cd9.tar.xz
ceph: convert port endianness
The port is informational only, but we should make it correct. Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r--fs/ceph/messenger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c
index 6ff44bb..5cc3748 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;
}