Loading net/ipv6/ip6_output.c +13 −5 Original line number Original line Diff line number Diff line Loading @@ -88,7 +88,8 @@ static int ip6_finish_output2(struct sk_buff *skb) struct dst_entry *dst = skb_dst(skb); struct dst_entry *dst = skb_dst(skb); struct net_device *dev = dst->dev; struct net_device *dev = dst->dev; struct neighbour *neigh; struct neighbour *neigh; struct rt6_info *rt; struct in6_addr *nexthop; int ret; skb->protocol = htons(ETH_P_IPV6); skb->protocol = htons(ETH_P_IPV6); skb->dev = dev; skb->dev = dev; Loading Loading @@ -123,10 +124,17 @@ static int ip6_finish_output2(struct sk_buff *skb) skb->len); skb->len); } } rt = (struct rt6_info *) dst; rcu_read_lock_bh(); neigh = rt->n; nexthop = rt6_nexthop((struct rt6_info *)dst, &ipv6_hdr(skb)->daddr); if (neigh) neigh = __ipv6_neigh_lookup_noref(dst->dev, nexthop); return dst_neigh_output(dst, neigh, skb); if (unlikely(!neigh)) neigh = __neigh_create(&nd_tbl, nexthop, dst->dev, false); if (!IS_ERR(neigh)) { ret = dst_neigh_output(dst, neigh, skb); rcu_read_unlock_bh(); return ret; } rcu_read_unlock_bh(); IP6_INC_STATS_BH(dev_net(dst->dev), IP6_INC_STATS_BH(dev_net(dst->dev), ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); Loading Loading
net/ipv6/ip6_output.c +13 −5 Original line number Original line Diff line number Diff line Loading @@ -88,7 +88,8 @@ static int ip6_finish_output2(struct sk_buff *skb) struct dst_entry *dst = skb_dst(skb); struct dst_entry *dst = skb_dst(skb); struct net_device *dev = dst->dev; struct net_device *dev = dst->dev; struct neighbour *neigh; struct neighbour *neigh; struct rt6_info *rt; struct in6_addr *nexthop; int ret; skb->protocol = htons(ETH_P_IPV6); skb->protocol = htons(ETH_P_IPV6); skb->dev = dev; skb->dev = dev; Loading Loading @@ -123,10 +124,17 @@ static int ip6_finish_output2(struct sk_buff *skb) skb->len); skb->len); } } rt = (struct rt6_info *) dst; rcu_read_lock_bh(); neigh = rt->n; nexthop = rt6_nexthop((struct rt6_info *)dst, &ipv6_hdr(skb)->daddr); if (neigh) neigh = __ipv6_neigh_lookup_noref(dst->dev, nexthop); return dst_neigh_output(dst, neigh, skb); if (unlikely(!neigh)) neigh = __neigh_create(&nd_tbl, nexthop, dst->dev, false); if (!IS_ERR(neigh)) { ret = dst_neigh_output(dst, neigh, skb); rcu_read_unlock_bh(); return ret; } rcu_read_unlock_bh(); IP6_INC_STATS_BH(dev_net(dst->dev), IP6_INC_STATS_BH(dev_net(dst->dev), ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); Loading