mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-04 01:36:58 -05:00
tcp: use different parts of the port_offset for index and offset
commit 9e9b70ae923baf2b5e8a0ea4fd0c8451801ac526 upstream. Amit Klein suggests that we use different parts of port_offset for the table's index and the port offset so that there is no direct relation between them. Cc: Jason A. Donenfeld <[email protected]> Cc: Moshe Kol <[email protected]> Cc: Yossi Gilad <[email protected]> Cc: Amit Klein <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Signed-off-by: Willy Tarreau <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]> Cc: Ben Hutchings <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
95921a3bab
commit
53c5de3092
1 changed files with 1 additions and 1 deletions
|
|
@ -726,7 +726,7 @@ int __inet_hash_connect(struct inet_timewait_death_row *death_row,
|
|||
net_get_random_once(table_perturb, sizeof(table_perturb));
|
||||
index = hash_32(port_offset, INET_TABLE_PERTURB_SHIFT);
|
||||
|
||||
offset = READ_ONCE(table_perturb[index]) + port_offset;
|
||||
offset = READ_ONCE(table_perturb[index]) + (port_offset >> 32);
|
||||
offset %= remaining;
|
||||
|
||||
/* In first pass we try ports of @low parity.
|
||||
|
|
|
|||
Loading…
Reference in a new issue