Commit 4330487a authored by Duan Jiong's avatar Duan Jiong Committed by David S. Miller

net: use inet6_iif instead of IP6CB()->iif

Signed-off-by: default avatarDuan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7bcc6738
...@@ -911,7 +911,7 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -911,7 +911,7 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
sin6->sin6_flowinfo = ip6_flowinfo(ip6); sin6->sin6_flowinfo = ip6_flowinfo(ip6);
sin6->sin6_scope_id = sin6->sin6_scope_id =
ipv6_iface_scope_id(&sin6->sin6_addr, ipv6_iface_scope_id(&sin6->sin6_addr,
IP6CB(skb)->iif); inet6_iif(skb));
*addr_len = sizeof(*sin6); *addr_len = sizeof(*sin6);
} }
......
...@@ -176,7 +176,7 @@ static bool ipv6_raw_deliver(struct sk_buff *skb, int nexthdr) ...@@ -176,7 +176,7 @@ static bool ipv6_raw_deliver(struct sk_buff *skb, int nexthdr)
goto out; goto out;
net = dev_net(skb->dev); 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) { while (sk) {
int filtered; int filtered;
...@@ -220,7 +220,7 @@ static bool ipv6_raw_deliver(struct sk_buff *skb, int nexthdr) ...@@ -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, sk = __raw_v6_lookup(net, sk_next(sk), nexthdr, daddr, saddr,
IP6CB(skb)->iif); inet6_iif(skb));
} }
out: out:
read_unlock(&raw_v6_hashinfo.lock); read_unlock(&raw_v6_hashinfo.lock);
...@@ -375,7 +375,7 @@ void raw6_icmp_error(struct sk_buff *skb, int nexthdr, ...@@ -375,7 +375,7 @@ void raw6_icmp_error(struct sk_buff *skb, int nexthdr,
net = dev_net(skb->dev); net = dev_net(skb->dev);
while ((sk = __raw_v6_lookup(net, sk, nexthdr, saddr, daddr, while ((sk = __raw_v6_lookup(net, sk, nexthdr, saddr, daddr,
IP6CB(skb)->iif))) { inet6_iif(skb)))) {
rawv6_err(sk, skb, NULL, type, code, rawv6_err(sk, skb, NULL, type, code,
inner_offset, info); inner_offset, info);
sk = sk_next(sk); sk = sk_next(sk);
...@@ -506,7 +506,7 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk, ...@@ -506,7 +506,7 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk,
sin6->sin6_addr = ipv6_hdr(skb)->saddr; sin6->sin6_addr = ipv6_hdr(skb)->saddr;
sin6->sin6_flowinfo = 0; sin6->sin6_flowinfo = 0;
sin6->sin6_scope_id = ipv6_iface_scope_id(&sin6->sin6_addr, sin6->sin6_scope_id = ipv6_iface_scope_id(&sin6->sin6_addr,
IP6CB(skb)->iif); inet6_iif(skb));
*addr_len = sizeof(*sin6); *addr_len = sizeof(*sin6);
} }
......
...@@ -472,7 +472,7 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, ...@@ -472,7 +472,7 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
sin6->sin6_addr = ipv6_hdr(skb)->saddr; sin6->sin6_addr = ipv6_hdr(skb)->saddr;
sin6->sin6_scope_id = sin6->sin6_scope_id =
ipv6_iface_scope_id(&sin6->sin6_addr, ipv6_iface_scope_id(&sin6->sin6_addr,
IP6CB(skb)->iif); inet6_iif(skb));
} }
*addr_len = sizeof(*sin6); *addr_len = sizeof(*sin6);
} }
......
...@@ -687,7 +687,7 @@ static int l2tp_ip6_recvmsg(struct kiocb *iocb, struct sock *sk, ...@@ -687,7 +687,7 @@ static int l2tp_ip6_recvmsg(struct kiocb *iocb, struct sock *sk,
lsa->l2tp_scope_id = 0; lsa->l2tp_scope_id = 0;
lsa->l2tp_conn_id = 0; lsa->l2tp_conn_id = 0;
if (ipv6_addr_type(&lsa->l2tp_addr) & IPV6_ADDR_LINKLOCAL) 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) if (np->rxopt.all)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment