mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Fix typo in SDBM hash function.
Thanks to Luis Carvalho for spotting the error.
This commit is contained in:
@@ -651,7 +651,7 @@ int address_allocate(struct dhcp_context *context,
|
|||||||
/* hash hwaddr: use the SDBM hashing algorithm. Seems to give good
|
/* hash hwaddr: use the SDBM hashing algorithm. Seems to give good
|
||||||
dispersal even with similarly-valued "strings". */
|
dispersal even with similarly-valued "strings". */
|
||||||
for (j = 0, i = 0; i < hw_len; i++)
|
for (j = 0, i = 0; i < hw_len; i++)
|
||||||
j += hwaddr[i] + (j << 6) + (j << 16) - j;
|
j = hwaddr[i] + (j << 6) + (j << 16) - j;
|
||||||
|
|
||||||
for (pass = 0; pass <= 1; pass++)
|
for (pass = 0; pass <= 1; pass++)
|
||||||
for (c = context; c; c = c->current)
|
for (c = context; c; c = c->current)
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ struct dhcp_context *address6_allocate(struct dhcp_context *context, unsigned c
|
|||||||
j = rand64();
|
j = rand64();
|
||||||
else
|
else
|
||||||
for (j = iaid, i = 0; i < clid_len; i++)
|
for (j = iaid, i = 0; i < clid_len; i++)
|
||||||
j += clid[i] + (j << 6) + (j << 16) - j;
|
j = clid[i] + (j << 6) + (j << 16) - j;
|
||||||
|
|
||||||
for (pass = 0; pass <= plain_range ? 1 : 0; pass++)
|
for (pass = 0; pass <= plain_range ? 1 : 0; pass++)
|
||||||
for (c = context; c; c = c->current)
|
for (c = context; c; c = c->current)
|
||||||
|
|||||||
Reference in New Issue
Block a user