aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r--net/ipv6/ip6_output.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index c94e4aabe11..6d9c0abc8c2 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -88,6 +88,7 @@ static int ip6_finish_output2(struct sk_buff *skb)
88 struct dst_entry *dst = skb_dst(skb); 88 struct dst_entry *dst = skb_dst(skb);
89 struct net_device *dev = dst->dev; 89 struct net_device *dev = dst->dev;
90 struct neighbour *neigh; 90 struct neighbour *neigh;
91 struct rt6_info *rt;
91 92
92 skb->protocol = htons(ETH_P_IPV6); 93 skb->protocol = htons(ETH_P_IPV6);
93 skb->dev = dev; 94 skb->dev = dev;
@@ -123,7 +124,8 @@ static int ip6_finish_output2(struct sk_buff *skb)
123 } 124 }
124 125
125 rcu_read_lock(); 126 rcu_read_lock();
126 neigh = dst_get_neighbour_noref(dst); 127 rt = (struct rt6_info *) dst;
128 neigh = rt->n;
127 if (neigh) { 129 if (neigh) {
128 int res = dst_neigh_output(dst, neigh, skb); 130 int res = dst_neigh_output(dst, neigh, skb);
129 131
@@ -944,6 +946,7 @@ static int ip6_dst_lookup_tail(struct sock *sk,
944 struct net *net = sock_net(sk); 946 struct net *net = sock_net(sk);
945#ifdef CONFIG_IPV6_OPTIMISTIC_DAD 947#ifdef CONFIG_IPV6_OPTIMISTIC_DAD
946 struct neighbour *n; 948 struct neighbour *n;
949 struct rt6_info *rt;
947#endif 950#endif
948 int err; 951 int err;
949 952
@@ -972,7 +975,8 @@ static int ip6_dst_lookup_tail(struct sock *sk,
972 * dst entry of the nexthop router 975 * dst entry of the nexthop router
973 */ 976 */
974 rcu_read_lock(); 977 rcu_read_lock();
975 n = dst_get_neighbour_noref(*dst); 978 rt = (struct rt6_info *) dst;
979 n = rt->n;
976 if (n && !(n->nud_state & NUD_VALID)) { 980 if (n && !(n->nud_state & NUD_VALID)) {
977 struct inet6_ifaddr *ifp; 981 struct inet6_ifaddr *ifp;
978 struct flowi6 fl_gw6; 982 struct flowi6 fl_gw6;