diff options
author | Shawn Routhier <sar@isc.org> | 2010-05-14 23:46:59 +0000 |
---|---|---|
committer | Shawn Routhier <sar@isc.org> | 2010-05-14 23:46:59 +0000 |
commit | 1943bbf803f5a46f3f7e118785709fd82575e41e (patch) | |
tree | 4cfa897498b84be888e1987bf600518ef9338b6d /omapip | |
parent | 74378079846d1a8491bfa3d54feeb675a64a0dca (diff) | |
download | isc-dhcp-1943bbf803f5a46f3f7e118785709fd82575e41e.tar.gz |
Allow zero-length client ids when hashing. Ticket 21253
Diffstat (limited to 'omapip')
-rw-r--r-- | omapip/hash.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/omapip/hash.c b/omapip/hash.c index e33f803e..c3aa737c 100644 --- a/omapip/hash.c +++ b/omapip/hash.c @@ -3,7 +3,8 @@ Routines for manipulating hash tables... */ /* - * Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any @@ -49,8 +50,13 @@ find_length(const void *key, if (do_hash == do_ip4_hash) return 4; - log_fatal("Impossible condition at %s:%d.", MDL); - return 0; /* Silence compiler warnings. */ + log_debug("Unexpected hash function at %s:%d.", MDL); + /* + * If we get a hash function we don't specifically expect + * return a length of 0, this covers the case where a client + * id has a length of 0. + */ + return 0; } int new_hash_table (tp, count, file, line) |