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

In commit 190cc824

 ("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: default avatarAmit Klein <aksecurity@gmail.com>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
7ccb026e
Name Last commit Last update
..
6lowpan 6lowpan: iphc: Fix an off-by-one check of array index
802 net/802/garp: fix memleak in garp_request_join()
8021q net: vlan: fix underflow for the real_dev refcnt
9p xen/9p: use alloc/free_pages_exact()
appletalk appletalk: Fix skb allocation size in loopback case
atm net: atm: fix update of position index in lec_seq_next
ax25 net: ax25: Fix deadlock caused by skb_recv_datagram in ax25_recvmsg
batman-adv batman-adv: Don't skb_split skbuffs with frag_list
bluetooth Bluetooth: use hdev lock for accept_list and reject_list in conn req
bpf bpf, test, cgroup: Use sk_{alloc,free} for test cases
bpfilter bpfilter: Specify the log level for the kmsg message
bridge net: bridge: Clear offload_fwd_mark when passing frame up bridge interface.
caif net-caif: avoid user-triggerable WARN_ON(1)
can can: isotp: remove re-binding of bound socket
ceph libceph: fix potential use-after-free on linger ping and resends
core netfilter: nf_tables: bail out early if hardware offload is not supported
dcb net: dcb: disable softirqs in dcbnl_flush_dev()
dccp lsm,selinux: pass flowi_common instead of flowi to the LSM hooks
decnet net: decnet: Fix sleeping inside in af_decnet
dns_resolver docs: networking: convert dns_resolver.txt to ReST
dsa net: dsa: Add missing of_node_put() in dsa_port_link_register_of
ethernet net: move devres helpers into a separate source file
ethtool ethtool: do not perform operations on net devices being unregistered
hsr net: hsr: fix mac_len checks
ieee802154 net: ieee802154: Return meaningful error codes from the netlink helpers
ife
ipv4
ipv6
iucv
kcm
key
l2tp
l3mdev
lapb
llc
mac80211
mac802154
mpls
mptcp
ncsi
netfilter
netlabel
netlink
netrom
nfc
nsh
openvswitch
packet
phonet
psample
qrtr
rds
rfkill
rose
rxrpc
sched
sctp
smc
strparser
sunrpc
switchdev
tipc
tls
unix
vmw_vsock
wimax
wireless
x25
xdp
xfrm
Kconfig
Makefile
compat.c
devres.c
socket.c
sysctl_net.c