Merge branch 'linux-3.16' of git://anongit.freedesktop.org/git/nouveau/linux-2.6...
[deliverable/linux.git] / net / ipv6 / udp.c
index 7edf096867c4205342152ea8a5fba6f7ad9a4a66..95c8347992882e5cbef7719b0ae940fc659af057 100644 (file)
@@ -705,17 +705,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 +723,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;
@@ -794,10 +793,10 @@ static int __udp6_lib_mcast_deliver(struct net *net, struct sk_buff *skb,
        dif = inet6_iif(skb);
        sk = udp_v6_mcast_next(net, sk, uh->dest, daddr, uh->source, saddr, dif);
        while (sk) {
-               /* If zero checksum and sk_no_check is not on for
+               /* If zero checksum and no_check is not on for
                 * the socket then skip it.
                 */
-               if (uh->check || sk->sk_no_check)
+               if (uh->check || udp_sk(sk)->no_check6_rx)
                        stack[count++] = sk;
 
                sk = udp_v6_mcast_next(net, sk_nulls_next(sk), uh->dest, daddr,
@@ -887,7 +886,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
        if (sk != NULL) {
                int ret;
 
-               if (!uh->check && !sk->sk_no_check) {
+               if (!uh->check && !udp_sk(sk)->no_check6_rx) {
                        sock_put(sk);
                        udp6_csum_zero_error(skb);
                        goto csum_error;
@@ -1037,7 +1036,7 @@ static int udp_v6_push_pending_frames(struct sock *sk)
 
        if (is_udplite)
                csum = udplite_csum_outgoing(sk, skb);
-       else if (sk->sk_no_check == UDP_CSUM_NOXMIT) {   /* UDP csum disabled */
+       else if (up->no_check6_tx) {   /* UDP csum disabled */
                skb->ip_summed = CHECKSUM_NONE;
                goto send;
        } else if (skb->ip_summed == CHECKSUM_PARTIAL) { /* UDP hardware csum */
@@ -1507,7 +1506,6 @@ static struct inet_protosw udpv6_protosw = {
        .protocol =  IPPROTO_UDP,
        .prot =      &udpv6_prot,
        .ops =       &inet6_dgram_ops,
-       .no_check =  UDP_CSUM_DEFAULT,
        .flags =     INET_PROTOSW_PERMANENT,
 };
 
This page took 0.032755 seconds and 5 git commands to generate.