Lines Matching refs:rth

393 static inline bool rt_is_expired(const struct rtable *rth)  in rt_is_expired()  argument
395 return rth->rt_genid != rt_genid_ipv4(dev_net(rth->dst.dev)); in rt_is_expired()
1727 struct rtable *rth; in ip_route_input_mc() local
1741 rth = rt_dst_alloc(dev_net(dev)->loopback_dev, flags, RTN_MULTICAST, in ip_route_input_mc()
1743 if (!rth) in ip_route_input_mc()
1747 rth->dst.tclassid = itag; in ip_route_input_mc()
1749 rth->dst.output = ip_rt_bug; in ip_route_input_mc()
1750 rth->rt_is_input= 1; in ip_route_input_mc()
1754 rth->dst.input = ip_mr_input; in ip_route_input_mc()
1759 skb_dst_set(skb, &rth->dst); in ip_route_input_mc()
1798 struct rtable *rth; in __mkroute_input() local
1852 rth = rcu_dereference(fnhe->fnhe_rth_input); in __mkroute_input()
1854 rth = rcu_dereference(nhc->nhc_rth_input); in __mkroute_input()
1855 if (rt_cache_valid(rth)) { in __mkroute_input()
1856 skb_dst_set_noref(skb, &rth->dst); in __mkroute_input()
1861 rth = rt_dst_alloc(out_dev->dev, 0, res->type, in __mkroute_input()
1863 if (!rth) { in __mkroute_input()
1868 rth->rt_is_input = 1; in __mkroute_input()
1871 rth->dst.input = ip_forward; in __mkroute_input()
1873 rt_set_nexthop(rth, daddr, res, fnhe, res->fi, res->type, itag, in __mkroute_input()
1875 lwtunnel_set_redirect(&rth->dst); in __mkroute_input()
1876 skb_dst_set(skb, &rth->dst); in __mkroute_input()
2233 struct rtable *rth; in ip_route_input_slow() local
2361 rth = rcu_dereference(nhc->nhc_rth_input); in ip_route_input_slow()
2362 if (rt_cache_valid(rth)) { in ip_route_input_slow()
2363 skb_dst_set_noref(skb, &rth->dst); in ip_route_input_slow()
2369 rth = rt_dst_alloc(ip_rt_get_dev(net, res), in ip_route_input_slow()
2371 if (!rth) in ip_route_input_slow()
2374 rth->dst.output= ip_rt_bug; in ip_route_input_slow()
2376 rth->dst.tclassid = itag; in ip_route_input_slow()
2378 rth->rt_is_input = 1; in ip_route_input_slow()
2382 rth->dst.input= ip_error; in ip_route_input_slow()
2383 rth->dst.error= -err; in ip_route_input_slow()
2384 rth->rt_flags &= ~RTCF_LOCAL; in ip_route_input_slow()
2390 rth->dst.lwtstate = lwtstate_get(nhc->nhc_lwtstate); in ip_route_input_slow()
2391 if (lwtunnel_input_redirect(rth->dst.lwtstate)) { in ip_route_input_slow()
2392 WARN_ON(rth->dst.input == lwtunnel_input); in ip_route_input_slow()
2393 rth->dst.lwtstate->orig_input = rth->dst.input; in ip_route_input_slow()
2394 rth->dst.input = lwtunnel_input; in ip_route_input_slow()
2397 if (unlikely(!rt_cache_route(nhc, rth))) in ip_route_input_slow()
2398 rt_add_uncached_list(rth); in ip_route_input_slow()
2400 skb_dst_set(skb, &rth->dst); in ip_route_input_slow()
2511 struct rtable *rth; in __mkroute_output() local
2586 rth = rcu_dereference(*prth); in __mkroute_output()
2587 if (rt_cache_valid(rth) && dst_hold_safe(&rth->dst)) in __mkroute_output()
2588 return rth; in __mkroute_output()
2592 rth = rt_dst_alloc(dev_out, flags, type, in __mkroute_output()
2594 if (!rth) in __mkroute_output()
2597 rth->rt_iif = orig_oif; in __mkroute_output()
2604 rth->dst.output = ip_mc_output; in __mkroute_output()
2611 rth->dst.input = ip_mr_input; in __mkroute_output()
2612 rth->dst.output = ip_mc_output; in __mkroute_output()
2618 rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0, do_cache); in __mkroute_output()
2619 lwtunnel_set_redirect(&rth->dst); in __mkroute_output()
2621 return rth; in __mkroute_output()
2637 struct rtable *rth; in ip_route_output_key_hash() local
2643 rth = ip_route_output_key_hash_rcu(net, fl4, &res, skb); in ip_route_output_key_hash()
2646 return rth; in ip_route_output_key_hash()
2657 struct rtable *rth; in ip_route_output_key_hash_rcu() local
2664 rth = ERR_PTR(-EINVAL); in ip_route_output_key_hash_rcu()
2668 rth = ERR_PTR(-ENETUNREACH); in ip_route_output_key_hash_rcu()
2715 rth = ERR_PTR(-ENODEV); in ip_route_output_key_hash_rcu()
2721 rth = ERR_PTR(-ENETUNREACH); in ip_route_output_key_hash_rcu()
2783 rth = ERR_PTR(err); in ip_route_output_key_hash_rcu()
2814 rth = __mkroute_output(res, fl4, orig_oif, dev_out, flags); in ip_route_output_key_hash_rcu()
2817 return rth; in ip_route_output_key_hash_rcu()