net: use inet6_iif instead of IP6CB()->iif
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>
Fri, 1 Aug 2014 01:52:58 +0000 (09:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Aug 2014 05:37:06 +0000 (22:37 -0700)
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ping.c
net/ipv6/raw.c
net/ipv6/udp.c
net/l2tp/l2tp_ip6.c

index 044a0ddf6a791ace04fbb1802e64563bf3fc5518..a3c59a077a5f0574f02584b0068de0703d5cb3dc 100644 (file)
@@ -911,7 +911,7 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
                                sin6->sin6_flowinfo = ip6_flowinfo(ip6);
                        sin6->sin6_scope_id =
                                ipv6_iface_scope_id(&sin6->sin6_addr,
-                                                   IP6CB(skb)->iif);
+                                                   inet6_iif(skb));
                        *addr_len = sizeof(*sin6);
                }
 
index dee80fb1aa86299e34b2671e93cca036bb7ff3ee..39d44226e402473ed03058f6945111f02abeb146 100644 (file)
@@ -176,7 +176,7 @@ static bool ipv6_raw_deliver(struct sk_buff *skb, int nexthdr)
                goto out;
 
        net = dev_net(skb->dev);
-       sk = __raw_v6_lookup(net, sk, nexthdr, daddr, saddr, IP6CB(skb)->iif);
+       sk = __raw_v6_lookup(net, sk, nexthdr, daddr, saddr, inet6_iif(skb));
 
        while (sk) {
                int filtered;
@@ -220,7 +220,7 @@ static bool ipv6_raw_deliver(struct sk_buff *skb, int nexthdr)
                        }
                }
                sk = __raw_v6_lookup(net, sk_next(sk), nexthdr, daddr, saddr,
-                                    IP6CB(skb)->iif);
+                                    inet6_iif(skb));
        }
 out:
        read_unlock(&raw_v6_hashinfo.lock);
@@ -375,7 +375,7 @@ void raw6_icmp_error(struct sk_buff *skb, int nexthdr,
                net = dev_net(skb->dev);
 
                while ((sk = __raw_v6_lookup(net, sk, nexthdr, saddr, daddr,
-                                               IP6CB(skb)->iif))) {
+                                               inet6_iif(skb)))) {
                        rawv6_err(sk, skb, NULL, type, code,
                                        inner_offset, info);
                        sk = sk_next(sk);
@@ -506,7 +506,7 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk,
                sin6->sin6_addr = ipv6_hdr(skb)->saddr;
                sin6->sin6_flowinfo = 0;
                sin6->sin6_scope_id = ipv6_iface_scope_id(&sin6->sin6_addr,
-                                                         IP6CB(skb)->iif);
+                                                         inet6_iif(skb));
                *addr_len = sizeof(*sin6);
        }
 
index c6941a1ac97768b2b35bca68f8ac74531c855700..4836af8f582d32d881f8697c1c92b6909e37ab27 100644 (file)
@@ -472,7 +472,7 @@ try_again:
                        sin6->sin6_addr = ipv6_hdr(skb)->saddr;
                        sin6->sin6_scope_id =
                                ipv6_iface_scope_id(&sin6->sin6_addr,
-                                                   IP6CB(skb)->iif);
+                                                   inet6_iif(skb));
                }
                *addr_len = sizeof(*sin6);
        }
index f3f98a156ceed8ebc5843368aa0d1988175e5fc7..0edb263cc002e84d7192e63552bcdcf260aeb6fa 100644 (file)
@@ -687,7 +687,7 @@ static int l2tp_ip6_recvmsg(struct kiocb *iocb, struct sock *sk,
                lsa->l2tp_scope_id = 0;
                lsa->l2tp_conn_id = 0;
                if (ipv6_addr_type(&lsa->l2tp_addr) & IPV6_ADDR_LINKLOCAL)
-                       lsa->l2tp_scope_id = IP6CB(skb)->iif;
+                       lsa->l2tp_scope_id = inet6_iif(skb);
        }
 
        if (np->rxopt.all)