ceph: convert port endianness
The port is informational only, but we should make it correct. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
6a18be16f7
commit
f28bcfbe66
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue