Willy Tarreau a81a6b204a tcp: drop the hash_32() part from the index calculation
commit e8161345ddbb66e449abde10d2fdce93f867eba9 upstream.

In commit 190cc82489f4 ("tcp: change source port randomizarion at
connect() time"), the table_perturb[] array was introduced and an
index was taken from the port_offset via hash_32(). But it turns
out that hash_32() performs a multiplication while the input here
comes from the output of SipHash in secure_seq, that is well
distributed enough to avoid the need for yet another hash.

Suggested-by: Amit Klein <aksecurity@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:45:20 +02:00
..
2018-04-13 19:48:32 +02:00
2021-12-08 08:45:05 +01:00
2016-09-21 00:23:01 -04:00
2022-05-18 09:15:44 +02:00
2022-02-08 18:15:28 +01:00
2019-04-17 08:36:45 +02:00
2017-05-14 14:00:21 +02:00
2016-09-01 14:09:01 -07:00
2022-03-23 09:00:33 +01:00