aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-12-03 18:29:30 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-03 18:29:30 -0500
commit04a6f4417bfd17c3860e8fb37387cb78265ffe44 (patch)
tree510ac1d7b69dc5ebcc0ab53130442274f70e3652 /net/ipv6
parent3830847396fa6d7f9a5fec0ca9819c47ac8a64e8 (diff)
ipv6: Kill ndisc_get_neigh() inline helper.
It's only used in net/ipv6/route.c and the NULL device check is superfluous for all of the existing call sites. Just expand the __ndisc_lookup_errno() call at each location. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/route.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 897a13f7c6b1..1138b0a5566d 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -744,7 +744,8 @@ static struct rt6_info *rt6_alloc_cow(const struct rt6_info *ort,
744#endif 744#endif
745 745
746 retry: 746 retry:
747 neigh = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway); 747 neigh = __neigh_lookup_errno(&nd_tbl, &rt->rt6i_gateway,
748 rt->rt6i_dev);
748 if (IS_ERR(neigh)) { 749 if (IS_ERR(neigh)) {
749 struct net *net = dev_net(rt->rt6i_dev); 750 struct net *net = dev_net(rt->rt6i_dev);
750 int saved_rt_min_interval = 751 int saved_rt_min_interval =
@@ -1085,7 +1086,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
1085 if (neigh) 1086 if (neigh)
1086 neigh_hold(neigh); 1087 neigh_hold(neigh);
1087 else { 1088 else {
1088 neigh = ndisc_get_neigh(dev, addr); 1089 neigh = __neigh_lookup_errno(&nd_tbl, addr, dev);
1089 if (IS_ERR(neigh)) 1090 if (IS_ERR(neigh))
1090 neigh = NULL; 1091 neigh = NULL;
1091 } 1092 }
@@ -2082,7 +2083,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
2082 rt->rt6i_flags |= RTF_ANYCAST; 2083 rt->rt6i_flags |= RTF_ANYCAST;
2083 else 2084 else
2084 rt->rt6i_flags |= RTF_LOCAL; 2085 rt->rt6i_flags |= RTF_LOCAL;
2085 neigh = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway); 2086 neigh = __neigh_lookup_errno(&nd_tbl, &rt->rt6i_gateway, rt->rt6i_dev);
2086 if (IS_ERR(neigh)) { 2087 if (IS_ERR(neigh)) {
2087 dst_free(&rt->dst); 2088 dst_free(&rt->dst);
2088 2089