Merge tag 'stable/for-linus-3.16-rc5-tag' of git://git.kernel.org/pub/scm/linux/kerne...
[deliverable/linux.git] / net / ipv6 / udp.c
index 60325236446a97fbb753ddb0c29ac31accf73ed1..7092ff78fd8498e1cf84a20091b92d6c867a64e6 100644 (file)
@@ -674,8 +674,11 @@ int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
                        goto csum_error;
        }
 
-       if (sk_rcvqueues_full(sk, skb, sk->sk_rcvbuf))
+       if (sk_rcvqueues_full(sk, skb, sk->sk_rcvbuf)) {
+               UDP6_INC_STATS_BH(sock_net(sk),
+                                 UDP_MIB_RCVBUFERRORS, is_udplite);
                goto drop;
+       }
 
        skb_dst_drop(skb);
 
@@ -690,6 +693,7 @@ int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
        bh_unlock_sock(sk);
 
        return rc;
+
 csum_error:
        UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite);
 drop:
@@ -705,17 +709,16 @@ static struct sock *udp_v6_mcast_next(struct net *net, struct sock *sk,
                                      int dif)
 {
        struct hlist_nulls_node *node;
-       struct sock *s = sk;
        unsigned short num = ntohs(loc_port);
 
-       sk_nulls_for_each_from(s, node) {
-               struct inet_sock *inet = inet_sk(s);
+       sk_nulls_for_each_from(sk, node) {
+               struct inet_sock *inet = inet_sk(sk);
 
-               if (!net_eq(sock_net(s), net))
+               if (!net_eq(sock_net(sk), net))
                        continue;
 
-               if (udp_sk(s)->udp_port_hash == num &&
-                   s->sk_family == PF_INET6) {
+               if (udp_sk(sk)->udp_port_hash == num &&
+                   sk->sk_family == PF_INET6) {
                        if (inet->inet_dport) {
                                if (inet->inet_dport != rmt_port)
                                        continue;
@@ -724,16 +727,16 @@ static struct sock *udp_v6_mcast_next(struct net *net, struct sock *sk,
                            !ipv6_addr_equal(&sk->sk_v6_daddr, rmt_addr))
                                continue;
 
-                       if (s->sk_bound_dev_if && s->sk_bound_dev_if != dif)
+                       if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif)
                                continue;
 
                        if (!ipv6_addr_any(&sk->sk_v6_rcv_saddr)) {
                                if (!ipv6_addr_equal(&sk->sk_v6_rcv_saddr, loc_addr))
                                        continue;
                        }
-                       if (!inet6_mc_check(s, loc_addr, rmt_addr))
+                       if (!inet6_mc_check(sk, loc_addr, rmt_addr))
                                continue;
-                       return s;
+                       return sk;
                }
        }
        return NULL;
This page took 0.025777 seconds and 5 git commands to generate.