len = sizeof(struct icmp6hdr) + sizeof(struct in6_addr);
- rt = ndisc_get_dummy_rt();
+ rt = ip6_dst_alloc();
if (!rt)
return;
saddr = &addr_buf;
}
- rt = ndisc_get_dummy_rt();
+ rt = ip6_dst_alloc();
if (!rt)
return;
int len;
int err;
- rt = ndisc_get_dummy_rt();
+ rt = ip6_dst_alloc();
if (!rt)
return;
rwlock_t rt6_lock = RW_LOCK_UNLOCKED;
-/* Dummy rt for ndisc */
-struct rt6_info *ndisc_get_dummy_rt()
+/* allocate dst with ip6_dst_ops */
+static __inline__ struct rt6_info *__ip6_dst_alloc(void)
{
return dst_alloc(&ip6_dst_ops);
}
+struct rt6_info *ip6_dst_alloc(void)
+{
+ return __ip6_dst_alloc();
+}
+
/*
* Route lookup. Any rt6_lock is implied.
*/
if (rtmsg->rtmsg_metric == 0)
rtmsg->rtmsg_metric = IP6_RT_PRIO_USER;
- rt = dst_alloc(&ip6_dst_ops);
+ rt = __ip6_dst_alloc();
if (rt == NULL)
return -ENOMEM;
static struct rt6_info * ip6_rt_copy(struct rt6_info *ort)
{
- struct rt6_info *rt;
-
- rt = dst_alloc(&ip6_dst_ops);
+ struct rt6_info *rt = __ip6_dst_alloc();
if (rt) {
rt->u.dst.input = ort->u.dst.input;
int ip6_rt_addr_add(struct in6_addr *addr, struct net_device *dev)
{
- struct rt6_info *rt;
+ struct rt6_info *rt = __ip6_dst_alloc();
- rt = dst_alloc(&ip6_dst_ops);
if (rt == NULL)
return -ENOMEM;