]> git.baikalelectronics.ru Git - kernel.git/commit
udp6: set rx_dst_cookie on rx_dst updates
authorPaolo Abeni <pabeni@redhat.com>
Fri, 25 Aug 2017 12:31:01 +0000 (14:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Aug 2017 03:09:13 +0000 (20:09 -0700)
commite665af2afc0cc333ec06219b0650f5bbe01780ef
treecf982fdd2ab7757341873711bd9bed8bdb974712
parentf8699c9ed2f1a00259e89d246c9faf1fbb04b9e7
udp6: set rx_dst_cookie on rx_dst updates

Currently, in the udp6 code, the dst cookie is not initialized/updated
concurrently with the RX dst used by early demux.

As a result, the dst_check() in the early_demux path always fails,
the rx dst cache is always invalidated, and we can't really
leverage significant gain from the demux lookup.

Fix it adding udp6 specific variant of sk_rx_dst_set() and use it
to set the dst cookie when the dst entry is really changed.

The issue is there since the introduction of early demux for ipv6.

Fixes: 98940cdd56c4 ("net: ipv6: Add early demux handler for UDP unicast")
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/udp.h
net/ipv4/udp.c
net/ipv6/udp.c