Lines Matching refs:rth

393 static inline bool rt_is_expired(const struct rtable *rth)
395 return rth->rt_genid != rt_genid_ipv4(dev_net(rth->dst.dev));
1727 struct rtable *rth;
1741 rth = rt_dst_alloc(dev_net(dev)->loopback_dev, flags, RTN_MULTICAST,
1743 if (!rth)
1747 rth->dst.tclassid = itag;
1749 rth->dst.output = ip_rt_bug;
1750 rth->rt_is_input= 1;
1754 rth->dst.input = ip_mr_input;
1759 skb_dst_set(skb, &rth->dst);
1798 struct rtable *rth;
1852 rth = rcu_dereference(fnhe->fnhe_rth_input);
1854 rth = rcu_dereference(nhc->nhc_rth_input);
1855 if (rt_cache_valid(rth)) {
1856 skb_dst_set_noref(skb, &rth->dst);
1861 rth = rt_dst_alloc(out_dev->dev, 0, res->type,
1863 if (!rth) {
1868 rth->rt_is_input = 1;
1871 rth->dst.input = ip_forward;
1873 rt_set_nexthop(rth, daddr, res, fnhe, res->fi, res->type, itag,
1875 lwtunnel_set_redirect(&rth->dst);
1876 skb_dst_set(skb, &rth->dst);
2234 struct rtable *rth;
2362 rth = rcu_dereference(nhc->nhc_rth_input);
2363 if (rt_cache_valid(rth)) {
2364 skb_dst_set_noref(skb, &rth->dst);
2370 rth = rt_dst_alloc(ip_rt_get_dev(net, res),
2372 if (!rth)
2375 rth->dst.output= ip_rt_bug;
2377 rth->dst.tclassid = itag;
2379 rth->rt_is_input = 1;
2383 rth->dst.input= ip_error;
2384 rth->dst.error= -err;
2385 rth->rt_flags &= ~RTCF_LOCAL;
2391 rth->dst.lwtstate = lwtstate_get(nhc->nhc_lwtstate);
2392 if (lwtunnel_input_redirect(rth->dst.lwtstate)) {
2393 WARN_ON(rth->dst.input == lwtunnel_input);
2394 rth->dst.lwtstate->orig_input = rth->dst.input;
2395 rth->dst.input = lwtunnel_input;
2398 if (unlikely(!rt_cache_route(nhc, rth)))
2399 rt_add_uncached_list(rth);
2401 skb_dst_set(skb, &rth->dst);
2512 struct rtable *rth;
2587 rth = rcu_dereference(*prth);
2588 if (rt_cache_valid(rth) && dst_hold_safe(&rth->dst))
2589 return rth;
2593 rth = rt_dst_alloc(dev_out, flags, type,
2595 if (!rth)
2598 rth->rt_iif = orig_oif;
2605 rth->dst.output = ip_mc_output;
2612 rth->dst.input = ip_mr_input;
2613 rth->dst.output = ip_mc_output;
2619 rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0, do_cache);
2620 lwtunnel_set_redirect(&rth->dst);
2622 return rth;
2638 struct rtable *rth;
2644 rth = ip_route_output_key_hash_rcu(net, fl4, &res, skb);
2647 return rth;
2658 struct rtable *rth;
2665 rth = ERR_PTR(-EINVAL);
2669 rth = ERR_PTR(-ENETUNREACH);
2716 rth = ERR_PTR(-ENODEV);
2722 rth = ERR_PTR(-ENETUNREACH);
2784 rth = ERR_PTR(err);
2815 rth = __mkroute_output(res, fl4, orig_oif, dev_out, flags);
2818 return rth;