Lines Matching refs:rth

423 static inline bool rt_is_expired(const struct rtable *rth)  in rt_is_expired()  argument
425 return rth->rt_genid != rt_genid_ipv4(dev_net(rth->dst.dev)); in rt_is_expired()
1639 struct rtable *rth; in ip_route_input_mc() local
1650 rth = rt_dst_alloc(dev_net(dev)->loopback_dev, flags, RTN_MULTICAST, in ip_route_input_mc()
1652 if (!rth) in ip_route_input_mc()
1656 rth->dst.tclassid = itag; in ip_route_input_mc()
1658 rth->dst.output = ip_rt_bug; in ip_route_input_mc()
1659 rth->rt_is_input= 1; in ip_route_input_mc()
1663 rth->dst.input = ip_mr_input; in ip_route_input_mc()
1667 skb_dst_set(skb, &rth->dst); in ip_route_input_mc()
1704 struct rtable *rth; in __mkroute_input() local
1751 rth = rcu_dereference(fnhe->fnhe_rth_input); in __mkroute_input()
1753 rth = rcu_dereference(FIB_RES_NH(*res).nh_rth_input); in __mkroute_input()
1754 if (rt_cache_valid(rth)) { in __mkroute_input()
1755 skb_dst_set_noref(skb, &rth->dst); in __mkroute_input()
1760 rth = rt_dst_alloc(out_dev->dev, 0, res->type, in __mkroute_input()
1763 if (!rth) { in __mkroute_input()
1768 rth->rt_is_input = 1; in __mkroute_input()
1771 rth->dst.input = ip_forward; in __mkroute_input()
1773 rt_set_nexthop(rth, daddr, res, fnhe, res->fi, res->type, itag, in __mkroute_input()
1775 lwtunnel_set_redirect(&rth->dst); in __mkroute_input()
1776 skb_dst_set(skb, &rth->dst); in __mkroute_input()
1924 struct rtable *rth; in ip_route_input_slow() local
2043 rth = rcu_dereference(FIB_RES_NH(*res).nh_rth_input); in ip_route_input_slow()
2044 if (rt_cache_valid(rth)) { in ip_route_input_slow()
2045 skb_dst_set_noref(skb, &rth->dst); in ip_route_input_slow()
2053 rth = rt_dst_alloc(l3mdev_master_dev_rcu(dev) ? : net->loopback_dev, in ip_route_input_slow()
2056 if (!rth) in ip_route_input_slow()
2059 rth->dst.output= ip_rt_bug; in ip_route_input_slow()
2061 rth->dst.tclassid = itag; in ip_route_input_slow()
2063 rth->rt_is_input = 1; in ip_route_input_slow()
2067 rth->dst.input= ip_error; in ip_route_input_slow()
2068 rth->dst.error= -err; in ip_route_input_slow()
2069 rth->rt_flags &= ~RTCF_LOCAL; in ip_route_input_slow()
2075 rth->dst.lwtstate = lwtstate_get(nh->nh_lwtstate); in ip_route_input_slow()
2076 if (lwtunnel_input_redirect(rth->dst.lwtstate)) { in ip_route_input_slow()
2077 WARN_ON(rth->dst.input == lwtunnel_input); in ip_route_input_slow()
2078 rth->dst.lwtstate->orig_input = rth->dst.input; in ip_route_input_slow()
2079 rth->dst.input = lwtunnel_input; in ip_route_input_slow()
2082 if (unlikely(!rt_cache_route(nh, rth))) in ip_route_input_slow()
2083 rt_add_uncached_list(rth); in ip_route_input_slow()
2085 skb_dst_set(skb, &rth->dst); in ip_route_input_slow()
2195 struct rtable *rth; in __mkroute_output() local
2270 rth = rcu_dereference(*prth); in __mkroute_output()
2271 if (rt_cache_valid(rth) && dst_hold_safe(&rth->dst)) in __mkroute_output()
2272 return rth; in __mkroute_output()
2276 rth = rt_dst_alloc(dev_out, flags, type, in __mkroute_output()
2280 if (!rth) in __mkroute_output()
2283 rth->rt_iif = orig_oif; in __mkroute_output()
2290 rth->dst.output = ip_mc_output; in __mkroute_output()
2297 rth->dst.input = ip_mr_input; in __mkroute_output()
2298 rth->dst.output = ip_mc_output; in __mkroute_output()
2304 rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0, do_cache); in __mkroute_output()
2305 lwtunnel_set_redirect(&rth->dst); in __mkroute_output()
2307 return rth; in __mkroute_output()
2324 struct rtable *rth; in ip_route_output_key_hash() local
2332 rth = ip_route_output_key_hash_rcu(net, fl4, &res, skb); in ip_route_output_key_hash()
2335 return rth; in ip_route_output_key_hash()
2346 struct rtable *rth; in ip_route_output_key_hash_rcu() local
2350 rth = ERR_PTR(-EINVAL); in ip_route_output_key_hash_rcu()
2401 rth = ERR_PTR(-ENODEV); in ip_route_output_key_hash_rcu()
2407 rth = ERR_PTR(-ENETUNREACH); in ip_route_output_key_hash_rcu()
2470 rth = ERR_PTR(err); in ip_route_output_key_hash_rcu()
2503 rth = __mkroute_output(res, fl4, orig_oif, dev_out, flags); in ip_route_output_key_hash_rcu()
2506 return rth; in ip_route_output_key_hash_rcu()