diff options
Diffstat (limited to 'net/ipv6/udp.c')
| -rw-r--r-- | net/ipv6/udp.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index f05099fc5901..99d0077b56b8 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
| @@ -48,6 +48,7 @@ | |||
| 48 | 48 | ||
| 49 | #include <linux/proc_fs.h> | 49 | #include <linux/proc_fs.h> |
| 50 | #include <linux/seq_file.h> | 50 | #include <linux/seq_file.h> |
| 51 | #include <trace/events/skb.h> | ||
| 51 | #include "udp_impl.h" | 52 | #include "udp_impl.h" |
| 52 | 53 | ||
| 53 | int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2) | 54 | int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2) |
| @@ -385,15 +386,16 @@ try_again: | |||
| 385 | 386 | ||
| 386 | if (skb_csum_unnecessary(skb)) | 387 | if (skb_csum_unnecessary(skb)) |
| 387 | err = skb_copy_datagram_iovec(skb, sizeof(struct udphdr), | 388 | err = skb_copy_datagram_iovec(skb, sizeof(struct udphdr), |
| 388 | msg->msg_iov, copied ); | 389 | msg->msg_iov, copied); |
| 389 | else { | 390 | else { |
| 390 | err = skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr), msg->msg_iov); | 391 | err = skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr), msg->msg_iov); |
| 391 | if (err == -EINVAL) | 392 | if (err == -EINVAL) |
| 392 | goto csum_copy_err; | 393 | goto csum_copy_err; |
| 393 | } | 394 | } |
| 394 | if (err) | 395 | if (unlikely(err)) { |
| 396 | trace_kfree_skb(skb, udpv6_recvmsg); | ||
| 395 | goto out_free; | 397 | goto out_free; |
| 396 | 398 | } | |
| 397 | if (!peeked) { | 399 | if (!peeked) { |
| 398 | if (is_udp4) | 400 | if (is_udp4) |
| 399 | UDP_INC_STATS_USER(sock_net(sk), | 401 | UDP_INC_STATS_USER(sock_net(sk), |
| @@ -479,6 +481,11 @@ void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
| 479 | if (sk == NULL) | 481 | if (sk == NULL) |
| 480 | return; | 482 | return; |
| 481 | 483 | ||
| 484 | if (type == ICMPV6_PKT_TOOBIG) | ||
| 485 | ip6_sk_update_pmtu(skb, sk, info); | ||
| 486 | if (type == NDISC_REDIRECT) | ||
| 487 | ip6_sk_redirect(skb, sk); | ||
| 488 | |||
| 482 | np = inet6_sk(sk); | 489 | np = inet6_sk(sk); |
| 483 | 490 | ||
| 484 | if (!icmpv6_err_convert(type, code, &err) && !np->recverr) | 491 | if (!icmpv6_err_convert(type, code, &err) && !np->recverr) |
