]> www.infradead.org Git - users/willy/xarray.git/commit
udp: fix l4 hash after reconnect
authorPaolo Abeni <pabeni@redhat.com>
Fri, 6 Dec 2024 15:49:14 +0000 (16:49 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 10 Dec 2024 14:30:36 +0000 (15:30 +0100)
commit51a00be6a0994da2ba6b4ace3b7a0d9373b4b25e
treece51b68b7612c0b58afc3f0cb1fe1bb9fcc1a96d
parent00301ef4b26d551141c96efeebff40904241f594
udp: fix l4 hash after reconnect

After the blamed commit below, udp_rehash() is supposed to be called
with both local and remote addresses set.

Currently that is already the case for IPv6 sockets, but for IPv4 the
destination address is updated after rehashing.

Address the issue moving the destination address and port initialization
before rehashing.

Fixes: 1b29a730ef8b ("ipv6/udp: Add 4-tuple hash for connected socket")
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/4761e466ab9f7542c68cdc95f248987d127044d2.1733499715.git.pabeni@redhat.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ipv4/datagram.c