diff options
Diffstat (limited to 'fs/ceph/messenger.c')
-rw-r--r-- | fs/ceph/messenger.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index 6ff44bbddf6..5cc374850d8 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c | |||
@@ -891,9 +891,9 @@ static int addr_port(struct sockaddr_storage *ss) | |||
891 | { | 891 | { |
892 | switch (ss->ss_family) { | 892 | switch (ss->ss_family) { |
893 | case AF_INET: | 893 | case AF_INET: |
894 | return ((struct sockaddr_in *)ss)->sin_port; | 894 | return ntohs(((struct sockaddr_in *)ss)->sin_port); |
895 | case AF_INET6: | 895 | case AF_INET6: |
896 | return ((struct sockaddr_in6 *)ss)->sin6_port; | 896 | return ntohs(((struct sockaddr_in6 *)ss)->sin6_port); |
897 | } | 897 | } |
898 | return 0; | 898 | return 0; |
899 | } | 899 | } |