diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-04-12 14:14:22 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-04-12 14:23:26 +0300 |
commit | 5a28c352a2f6de525f687c8869a2a4cb53bdb5e2 (patch) | |
tree | 46a5de7b4ec38d73121ae4866b95c964390440dc | |
parent | 5956fca5e3c1e7d5ecd12b604c812dd898b47635 (diff) | |
download | squark-5a28c352a2f6de525f687c8869a2a4cb53bdb5e2.tar.bz2 squark-5a28c352a2f6de525f687c8869a2a4cb53bdb5e2.tar.xz |
authdb: ipv4 is in network order; not host order
-rw-r--r-- | src/authdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/authdb.c b/src/authdb.c index ed309fe..8bbf372 100644 --- a/src/authdb.c +++ b/src/authdb.c @@ -155,9 +155,9 @@ void *authdb_get(struct authdb *adb, sockaddr_any *addr, struct authdb_entry *en return NULL; e = (unsigned char) b.ptr[0]; - b.ptr[0] = 0x00; + b.ptr[3] = 0x00; - hash = b.ptr[1] + b.ptr[2] + b.ptr[3]; + hash = b.ptr[0] + b.ptr[1] + b.ptr[2]; hash %= ARRAY_SIZE(adb->hash_bucket); for (me = adb->hash_bucket[hash]; me != NULL; me = me->next) { |