aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-03 01:43:47 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-05 05:41:58 -0400
commit97cac0821af4474ec4ba3a9e7a36b98ed9b6db88 (patch)
tree49c33db384053e154ce37839d07eae93f9cd4eae /net/ipv6/ip6_output.c
parent534cb283efef9fdbd9f70f4615054d26aa444dd6 (diff)
ipv6: Store route neighbour in rt6_info struct.
This makes for a simplified conversion away from dst_get_neighbour*(). All code outside of ipv6 will use neigh lookups via dst_neigh_lookup*(). Signed-off-by: David S. Miller <davem@davemloft.net>
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 c94e4aabe11b..6d9c0abc8c20 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;