projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a18be1
)
ceph: convert port endianness
author
Sage Weil
<sage@newdream.net>
Wed, 4 Nov 2009 19:46:35 +0000
(11:46 -0800)
committer
Sage Weil
<sage@newdream.net>
Thu, 5 Nov 2009 00:36:12 +0000
(16:36 -0800)
The port is informational only, but we should make it correct.
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/messenger.c
patch
|
blob
|
history
diff --git
a/fs/ceph/messenger.c
b/fs/ceph/messenger.c
index
6ff44bb
..
5cc3748
100644
(file)
--- 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;
}