From: Mike Meffie Date: Sun, 15 Mar 2009 18:30:52 +0000 (+0000) Subject: DEVEL15-viced-improve-host-hashing-20090315 X-Git-Tag: openafs-devel-1_5_58~113 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=52484cc29b14fb400f85db7a371ec43eaf8a1e6f;p=packages%2Fo%2Fopenafs.git DEVEL15-viced-improve-host-hashing-20090315 LICENSE IPL10 FIXES 124447 hash based on host byte order so intel machines aren't sad (cherry picked from commit 5102d56f080f1284eecb94dbc7c06cb966c27f5b) --- diff --git a/src/viced/host.c b/src/viced/host.c index f17f5d660..3b8daa0ae 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -189,7 +189,7 @@ static struct host *HTFree = 0; /* first free file entry */ */ static struct h_AddrHashChain *hostAddrHashTable[h_HASHENTRIES]; static struct h_UuidHashChain *hostUuidHashTable[h_HASHENTRIES]; -#define h_HashIndex(hostip) ((hostip) & (h_HASHENTRIES-1)) +#define h_HashIndex(hostip) (ntohl(hostip) & (h_HASHENTRIES-1)) #define h_UuidHashIndex(uuidp) (((int)(afs_uuid_hash(uuidp))) & (h_HASHENTRIES-1)) struct HTBlock { /* block of HTSPERBLOCK file entries */