aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
authorJulian Anastasov <[email protected]>2017-02-06 21:14:16 +0000
committerDavid S. Miller <[email protected]>2017-02-07 18:07:47 +0000
commit0dec879f636f11b0ffda1cb5fd96a1754c59ead3 (patch)
treefcc479052e78ceb30f8f3b95a881cf986f0564dd /net/ipv6/udp.c
parentnet: add confirm_neigh method to dst_ops (diff)
downloadkernel-0dec879f636f11b0ffda1cb5fd96a1754c59ead3.tar.gz
kernel-0dec879f636f11b0ffda1cb5fd96a1754c59ead3.zip
net: use dst_confirm_neigh for UDP, RAW, ICMP, L2TP
When same struct dst_entry can be used for many different neighbours we can not use it for pending confirmations. The datagram protocols can use MSG_CONFIRM to confirm the neighbour. When used with MSG_PROBE we do not reach the code where neighbour is confirmed, so we have to do the same slow lookup by using the dst_confirm_neigh() helper. When MSG_PROBE is not used, ip_append_data/ip6_append_data will set the skb flag dst_pending_confirm. Reported-by: YueHaibing <[email protected]> Fixes: 5110effee8fd ("net: Do delayed neigh confirmation.") Fixes: f2bb4bedf35d ("ipv4: Cache output routes in fib_info nexthops.") Signed-off-by: Julian Anastasov <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index b4c6516a3a0c..51346fa70298 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1308,7 +1308,8 @@ out:
return err;
do_confirm:
- dst_confirm(dst);
+ if (msg->msg_flags & MSG_PROBE)
+ dst_confirm_neigh(dst, &fl6.daddr);
if (!(msg->msg_flags&MSG_PROBE) || len)
goto back_from_confirm;
err = 0;