Lines Matching refs:rth

424 static inline bool rt_is_expired(const struct rtable *rth)
426 return rth->rt_genid != rt_genid_ipv4(dev_net(rth->dst.dev));
1763 struct rtable *rth;
1779 rth = rt_dst_alloc(dev_net(dev)->loopback_dev, flags, RTN_MULTICAST,
1781 if (!rth)
1785 rth->dst.tclassid = itag;
1787 rth->dst.output = ip_rt_bug;
1788 rth->rt_is_input= 1;
1792 rth->dst.input = ip_mr_input;
1797 skb_dst_set(skb, &rth->dst);
1836 struct rtable *rth;
1891 rth = rcu_dereference(fnhe->fnhe_rth_input);
1893 rth = rcu_dereference(nhc->nhc_rth_input);
1894 if (rt_cache_valid(rth)) {
1895 skb_dst_set_noref(skb, &rth->dst);
1900 rth = rt_dst_alloc(out_dev->dev, 0, res->type, no_policy,
1902 if (!rth) {
1907 rth->rt_is_input = 1;
1910 rth->dst.input = ip_forward;
1912 rt_set_nexthop(rth, daddr, res, fnhe, res->fi, res->type, itag,
1914 lwtunnel_set_redirect(&rth->dst);
1915 skb_dst_set(skb, &rth->dst);
2153 struct rtable *rth;
2282 rth = rcu_dereference(nhc->nhc_rth_input);
2283 if (rt_cache_valid(rth)) {
2284 skb_dst_set_noref(skb, &rth->dst);
2290 rth = rt_dst_alloc(ip_rt_get_dev(net, res),
2293 if (!rth)
2296 rth->dst.output= ip_rt_bug;
2298 rth->dst.tclassid = itag;
2300 rth->rt_is_input = 1;
2304 rth->dst.input= ip_error;
2305 rth->dst.error= -err;
2306 rth->rt_flags &= ~RTCF_LOCAL;
2312 rth->dst.lwtstate = lwtstate_get(nhc->nhc_lwtstate);
2313 if (lwtunnel_input_redirect(rth->dst.lwtstate)) {
2314 WARN_ON(rth->dst.input == lwtunnel_input);
2315 rth->dst.lwtstate->orig_input = rth->dst.input;
2316 rth->dst.input = lwtunnel_input;
2319 if (unlikely(!rt_cache_route(nhc, rth)))
2320 rt_add_uncached_list(rth);
2322 skb_dst_set(skb, &rth->dst);
2433 struct rtable *rth;
2508 rth = rcu_dereference(*prth);
2509 if (rt_cache_valid(rth) && dst_hold_safe(&rth->dst))
2510 return rth;
2514 rth = rt_dst_alloc(dev_out, flags, type,
2517 if (!rth)
2520 rth->rt_iif = orig_oif;
2527 rth->dst.output = ip_mc_output;
2534 rth->dst.input = ip_mr_input;
2535 rth->dst.output = ip_mc_output;
2541 rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0, do_cache);
2542 lwtunnel_set_redirect(&rth->dst);
2544 return rth;
2560 struct rtable *rth;
2566 rth = ip_route_output_key_hash_rcu(net, fl4, &res, skb);
2569 return rth;
2580 struct rtable *rth;
2587 rth = ERR_PTR(-EINVAL);
2591 rth = ERR_PTR(-ENETUNREACH);
2638 rth = ERR_PTR(-ENODEV);
2644 rth = ERR_PTR(-ENETUNREACH);
2707 rth = ERR_PTR(err);
2738 rth = __mkroute_output(res, fl4, orig_oif, dev_out, flags);
2741 return rth;