mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-02 06:46:38 +02:00
fix-for-fix
This commit is contained in:
+3
-2
@@ -754,8 +754,9 @@ int hash_throttling(struct IN_ADDR *in)
|
||||
#ifndef INET6
|
||||
return ((unsigned int)in->s_addr % THROTTLING_HASH_SIZE);
|
||||
#else
|
||||
memcpy(&alpha, &cp[8], sizeof(alpha));
|
||||
memcpy(&beta, &cp[12], sizeof(beta));
|
||||
cp = (u_char *) &in->s6_addr;
|
||||
memcpy(&alpha, cp + 7, sizeof(alpha));
|
||||
memcpy(&beta, cp + 11, sizeof(beta));
|
||||
return ((alpha ^ beta) % THROTTLING_HASH_SIZE);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user