Skip to content

Commit

Permalink
ceph: convert port endianness
Browse files Browse the repository at this point in the history
The port is informational only, but we should make it correct.

Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed Nov 5, 2009
1 parent 6a18be1 commit f28bcfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f28bcfb

Please sign in to comment.