From 5102d56f080f1284eecb94dbc7c06cb966c27f5b Mon Sep 17 00:00:00 2001 From: Mike Meffie Date: Sun, 15 Mar 2009 18:30:41 +0000 Subject: [PATCH] viced-improve-host-hashing-20090315 LICENSE IPL10 FIXES 124447 hash based on host byte order so intel machines aren't sad --- src/viced/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/viced/host.c b/src/viced/host.c index 18d66e210..f42b07654 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 */ -- 2.39.5