diff options
author | Sage Weil <sage@newdream.net> | 2009-11-03 18:17:56 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-11-03 18:17:56 -0500 |
commit | 63f2d211954b790fea0a9caeae605c7956535af6 (patch) | |
tree | b49257aa54d9657539eeba014f9ff5f91f8495de /fs/ceph/mdsmap.c | |
parent | 859e7b149362475672e2a996f29b8f45cbb34d82 (diff) |
ceph: use fixed endian encoding for ceph_entity_addr
We exchange struct ceph_entity_addr over the wire and store it on disk.
The sockaddr_storage.ss_family field, however, is host endianness. So,
fix ss_family endianness to big endian when sending/receiving over the
wire.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mdsmap.c')
-rw-r--r-- | fs/ceph/mdsmap.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/mdsmap.c b/fs/ceph/mdsmap.c index 80daea064470..4226c810ce22 100644 --- a/fs/ceph/mdsmap.c +++ b/fs/ceph/mdsmap.c | |||
@@ -86,6 +86,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end) | |||
86 | 86 | ||
87 | ceph_decode_need(p, end, sizeof(addr) + 1 + sizeof(u32), bad); | 87 | ceph_decode_need(p, end, sizeof(addr) + 1 + sizeof(u32), bad); |
88 | ceph_decode_copy(p, &addr, sizeof(addr)); | 88 | ceph_decode_copy(p, &addr, sizeof(addr)); |
89 | ceph_decode_addr(&addr); | ||
89 | infoversion = ceph_decode_8(p); | 90 | infoversion = ceph_decode_8(p); |
90 | namelen = ceph_decode_32(p); /* skip mds name */ | 91 | namelen = ceph_decode_32(p); /* skip mds name */ |
91 | *p += namelen; | 92 | *p += namelen; |