Lines Matching refs:rth

433 static inline bool rt_is_expired(const struct rtable *rth)  in rt_is_expired()  argument
435 return rth->rt_genid != rt_genid_ipv4(dev_net(rth->dst.dev)); in rt_is_expired()
1476 struct rtable *rth; in ip_route_input_mc() local
1506 rth = rt_dst_alloc(dev_net(dev)->loopback_dev, flags, RTN_MULTICAST, in ip_route_input_mc()
1508 if (!rth) in ip_route_input_mc()
1512 rth->dst.tclassid = itag; in ip_route_input_mc()
1514 rth->dst.output = ip_rt_bug; in ip_route_input_mc()
1515 rth->rt_is_input= 1; in ip_route_input_mc()
1519 rth->dst.input = ip_mr_input; in ip_route_input_mc()
1523 skb_dst_set(skb, &rth->dst); in ip_route_input_mc()
1597 struct rtable *rth; in __mkroute_input() local
1644 rth = rcu_dereference(fnhe->fnhe_rth_input); in __mkroute_input()
1645 if (rth && rth->dst.expires && in __mkroute_input()
1646 time_after(jiffies, rth->dst.expires)) { in __mkroute_input()
1654 rth = rcu_dereference(FIB_RES_NH(*res).nh_rth_input); in __mkroute_input()
1657 if (rt_cache_valid(rth)) { in __mkroute_input()
1658 skb_dst_set_noref(skb, &rth->dst); in __mkroute_input()
1663 rth = rt_dst_alloc(out_dev->dev, 0, res->type, in __mkroute_input()
1666 if (!rth) { in __mkroute_input()
1671 rth->rt_is_input = 1; in __mkroute_input()
1673 rth->rt_table_id = res->table->tb_id; in __mkroute_input()
1676 rth->dst.input = ip_forward; in __mkroute_input()
1678 rt_set_nexthop(rth, daddr, res, fnhe, res->fi, res->type, itag); in __mkroute_input()
1679 if (lwtunnel_output_redirect(rth->dst.lwtstate)) { in __mkroute_input()
1680 rth->dst.lwtstate->orig_output = rth->dst.output; in __mkroute_input()
1681 rth->dst.output = lwtunnel_output; in __mkroute_input()
1683 if (lwtunnel_input_redirect(rth->dst.lwtstate)) { in __mkroute_input()
1684 rth->dst.lwtstate->orig_input = rth->dst.input; in __mkroute_input()
1685 rth->dst.input = lwtunnel_input; in __mkroute_input()
1687 skb_dst_set(skb, &rth->dst); in __mkroute_input()
1778 struct rtable *rth; in ip_route_input_slow() local
1884 rth = rcu_dereference(FIB_RES_NH(res).nh_rth_input); in ip_route_input_slow()
1885 if (rt_cache_valid(rth)) { in ip_route_input_slow()
1886 skb_dst_set_noref(skb, &rth->dst); in ip_route_input_slow()
1894 rth = rt_dst_alloc(net->loopback_dev, flags | RTCF_LOCAL, res.type, in ip_route_input_slow()
1896 if (!rth) in ip_route_input_slow()
1899 rth->dst.output= ip_rt_bug; in ip_route_input_slow()
1901 rth->dst.tclassid = itag; in ip_route_input_slow()
1903 rth->rt_is_input = 1; in ip_route_input_slow()
1905 rth->rt_table_id = res.table->tb_id; in ip_route_input_slow()
1909 rth->dst.input= ip_error; in ip_route_input_slow()
1910 rth->dst.error= -err; in ip_route_input_slow()
1911 rth->rt_flags &= ~RTCF_LOCAL; in ip_route_input_slow()
1914 if (unlikely(!rt_cache_route(&FIB_RES_NH(res), rth))) { in ip_route_input_slow()
1915 rth->dst.flags |= DST_NOCACHE; in ip_route_input_slow()
1916 rt_add_uncached_list(rth); in ip_route_input_slow()
1919 skb_dst_set(skb, &rth->dst); in ip_route_input_slow()
2010 struct rtable *rth; in __mkroute_output() local
2071 rth = rcu_dereference(*prth); in __mkroute_output()
2072 if (rth && rth->dst.expires && in __mkroute_output()
2073 time_after(jiffies, rth->dst.expires)) { in __mkroute_output()
2089 rth = rcu_dereference(*prth); in __mkroute_output()
2092 if (rt_cache_valid(rth)) { in __mkroute_output()
2093 dst_hold(&rth->dst); in __mkroute_output()
2094 return rth; in __mkroute_output()
2099 rth = rt_dst_alloc(dev_out, flags, type, in __mkroute_output()
2103 if (!rth) in __mkroute_output()
2106 rth->rt_iif = orig_oif ? : 0; in __mkroute_output()
2108 rth->rt_table_id = res->table->tb_id; in __mkroute_output()
2115 rth->dst.output = ip_mc_output; in __mkroute_output()
2122 rth->dst.input = ip_mr_input; in __mkroute_output()
2123 rth->dst.output = ip_mc_output; in __mkroute_output()
2129 rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0); in __mkroute_output()
2130 if (lwtunnel_output_redirect(rth->dst.lwtstate)) in __mkroute_output()
2131 rth->dst.output = lwtunnel_output; in __mkroute_output()
2133 return rth; in __mkroute_output()
2147 struct rtable *rth; in __ip_route_output_key_hash() local
2164 rth = ERR_PTR(-EINVAL); in __ip_route_output_key_hash()
2215 rth = ERR_PTR(-ENODEV); in __ip_route_output_key_hash()
2221 rth = ERR_PTR(-ENETUNREACH); in __ip_route_output_key_hash()
2241 rth = l3mdev_get_rtable(dev_out, fl4); in __ip_route_output_key_hash()
2242 if (rth) in __ip_route_output_key_hash()
2287 rth = ERR_PTR(err); in __ip_route_output_key_hash()
2311 rth = __mkroute_output(&res, fl4, orig_oif, dev_out, flags); in __ip_route_output_key_hash()
2315 return rth; in __ip_route_output_key_hash()