mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
[IPV6]: Introduce ip6_dst_idev() to get inet6_dev{} stored in dst_entry{}.
Otherwise, we will see a lot of casts... Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
This commit is contained in:
parent
40aa7b90a9
commit
7a3025b1b3
3 changed files with 7 additions and 2 deletions
|
|
@ -1164,7 +1164,7 @@ record_it:
|
|||
int ipv6_get_saddr(struct dst_entry *dst,
|
||||
struct in6_addr *daddr, struct in6_addr *saddr)
|
||||
{
|
||||
return ipv6_dev_get_saddr(dst ? ((struct rt6_info *)dst)->rt6i_idev->dev : NULL, daddr, saddr);
|
||||
return ipv6_dev_get_saddr(dst ? ip6_dst_idev(dst)->dev : NULL, daddr, saddr);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
|
|||
* arrived via the sending interface (ethX), because of the
|
||||
* nature of scoping architecture. --yoshfuji
|
||||
*/
|
||||
IP6CB(skb)->iif = skb->dst ? ((struct rt6_info *)skb->dst)->rt6i_idev->dev->ifindex : dev->ifindex;
|
||||
IP6CB(skb)->iif = skb->dst ? ip6_dst_idev(skb->dst)->dev->ifindex : dev->ifindex;
|
||||
|
||||
if (unlikely(!pskb_may_pull(skb, sizeof(*hdr))))
|
||||
goto err;
|
||||
|
|
|
|||
Loading…
Reference in a new issue