summaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
authorPhilo Lu <lulie@linux.alibaba.com>2025-01-10 02:08:10 +0100
committerPaolo Abeni <pabeni@redhat.com>2025-01-14 10:44:10 +0100
commit644f9108f3a505022ef43510e5143cb985e0cf8b (patch)
treedc707f812dbb35d9593feb68771b30c20efbde85 /net/8021q
parentr8169: remove redundant hwmon support (diff)
downloadlinux-644f9108f3a505022ef43510e5143cb985e0cf8b.tar.xz
linux-644f9108f3a505022ef43510e5143cb985e0cf8b.zip
udp: Make rehash4 independent in udp_lib_rehash()
As discussed in [0], rehash4 could be missed in udp_lib_rehash() when udp hash4 changes while hash2 doesn't change. This patch fixes this by moving rehash4 codes out of rehash2 checking, and then rehash2 and rehash4 are done separately. By doing this, we no longer need to call rehash4 explicitly in udp_lib_hash4(), as the rehash callback in __ip4_datagram_connect takes it. Thus, now udp_lib_hash4() returns directly if the sk is already hashed. Note that uhash4 may fail to work under consecutive connect(<dst address>) calls because rehash() is not called with every connect(). To overcome this, connect(<AF_UNSPEC>) needs to be called after the next connect to a new destination. [0] https://lore.kernel.org/all/4761e466ab9f7542c68cdc95f248987d127044d2.1733499715.git.pabeni@redhat.com/ Fixes: 78c91ae2c6de ("ipv4/udp: Add 4-tuple hash for connected socket") Suggested-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Philo Lu <lulie@linux.alibaba.com> Link: https://patch.msgid.link/20250110010810.107145-1-lulie@linux.alibaba.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/8021q')
0 files changed, 0 insertions, 0 deletions