]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: udp: Do a route lookup and update during release_cb
authorMartin KaFai Lau <kafai@fb.com>
Mon, 11 Apr 2016 22:29:37 +0000 (15:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Apr 2016 20:29:53 +0000 (16:29 -0400)
commitf045fb2bae13e7d485a33e48caae1820a2c317a6
tree4e761d6859d0784b6e24fb1f30cc85467053eba2
parentff76b4efdd412f49996e282cdf6855c239faa4fb
ipv6: udp: Do a route lookup and update during release_cb

This patch adds a release_cb for UDPv6.  It does a route lookup
and updates sk->sk_dst_cache if it is needed.  It picks up the
left-over job from ip6_sk_update_pmtu() if the sk was owned
by user during the pmtu update.

It takes a rcu_read_lock to protect the __sk_dst_get() operations
because another thread may do ip6_dst_store() without taking the
sk lock (e.g. sendmsg).

Fixes: a7bf6f4b7a43 ("ipv6: Only create RTF_CACHE routes after encountering pmtu exception")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reported-by: Wei Wang <weiwan@google.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Wei Wang <weiwan@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ipv6.h
net/ipv6/datagram.c
net/ipv6/udp.c