Lines Matching refs:rth

429 static inline bool rt_is_expired(const struct rtable *rth)  in rt_is_expired()  argument
431 return rth->rt_genid != rt_genid_ipv4(dev_net(rth->dst.dev)); in rt_is_expired()
1448 struct rtable *rth; in ip_route_input_mc() local
1475 rth = rt_dst_alloc(dev_net(dev)->loopback_dev, in ip_route_input_mc()
1477 if (!rth) in ip_route_input_mc()
1481 rth->dst.tclassid = itag; in ip_route_input_mc()
1483 rth->dst.output = ip_rt_bug; in ip_route_input_mc()
1485 rth->rt_genid = rt_genid_ipv4(dev_net(dev)); in ip_route_input_mc()
1486 rth->rt_flags = RTCF_MULTICAST; in ip_route_input_mc()
1487 rth->rt_type = RTN_MULTICAST; in ip_route_input_mc()
1488 rth->rt_is_input= 1; in ip_route_input_mc()
1489 rth->rt_iif = 0; in ip_route_input_mc()
1490 rth->rt_pmtu = 0; in ip_route_input_mc()
1491 rth->rt_gateway = 0; in ip_route_input_mc()
1492 rth->rt_uses_gateway = 0; in ip_route_input_mc()
1493 INIT_LIST_HEAD(&rth->rt_uncached); in ip_route_input_mc()
1495 rth->dst.input= ip_local_deliver; in ip_route_input_mc()
1496 rth->rt_flags |= RTCF_LOCAL; in ip_route_input_mc()
1501 rth->dst.input = ip_mr_input; in ip_route_input_mc()
1505 skb_dst_set(skb, &rth->dst); in ip_route_input_mc()
1579 struct rtable *rth; in __mkroute_input() local
1627 rth = rcu_dereference(fnhe->fnhe_rth_input); in __mkroute_input()
1628 if (rth && rth->dst.expires && in __mkroute_input()
1629 time_after(jiffies, rth->dst.expires)) { in __mkroute_input()
1637 rth = rcu_dereference(FIB_RES_NH(*res).nh_rth_input); in __mkroute_input()
1640 if (rt_cache_valid(rth)) { in __mkroute_input()
1641 skb_dst_set_noref(skb, &rth->dst); in __mkroute_input()
1646 rth = rt_dst_alloc(out_dev->dev, in __mkroute_input()
1649 if (!rth) { in __mkroute_input()
1654 rth->rt_genid = rt_genid_ipv4(dev_net(rth->dst.dev)); in __mkroute_input()
1655 rth->rt_flags = flags; in __mkroute_input()
1656 rth->rt_type = res->type; in __mkroute_input()
1657 rth->rt_is_input = 1; in __mkroute_input()
1658 rth->rt_iif = 0; in __mkroute_input()
1659 rth->rt_pmtu = 0; in __mkroute_input()
1660 rth->rt_gateway = 0; in __mkroute_input()
1661 rth->rt_uses_gateway = 0; in __mkroute_input()
1662 INIT_LIST_HEAD(&rth->rt_uncached); in __mkroute_input()
1665 rth->dst.input = ip_forward; in __mkroute_input()
1666 rth->dst.output = ip_output; in __mkroute_input()
1668 rt_set_nexthop(rth, daddr, res, fnhe, res->fi, res->type, itag); in __mkroute_input()
1669 skb_dst_set(skb, &rth->dst); in __mkroute_input()
1710 struct rtable *rth; in ip_route_input_slow() local
1807 rth = rcu_dereference(FIB_RES_NH(res).nh_rth_input); in ip_route_input_slow()
1808 if (rt_cache_valid(rth)) { in ip_route_input_slow()
1809 skb_dst_set_noref(skb, &rth->dst); in ip_route_input_slow()
1817 rth = rt_dst_alloc(net->loopback_dev, in ip_route_input_slow()
1819 if (!rth) in ip_route_input_slow()
1822 rth->dst.input= ip_local_deliver; in ip_route_input_slow()
1823 rth->dst.output= ip_rt_bug; in ip_route_input_slow()
1825 rth->dst.tclassid = itag; in ip_route_input_slow()
1828 rth->rt_genid = rt_genid_ipv4(net); in ip_route_input_slow()
1829 rth->rt_flags = flags|RTCF_LOCAL; in ip_route_input_slow()
1830 rth->rt_type = res.type; in ip_route_input_slow()
1831 rth->rt_is_input = 1; in ip_route_input_slow()
1832 rth->rt_iif = 0; in ip_route_input_slow()
1833 rth->rt_pmtu = 0; in ip_route_input_slow()
1834 rth->rt_gateway = 0; in ip_route_input_slow()
1835 rth->rt_uses_gateway = 0; in ip_route_input_slow()
1836 INIT_LIST_HEAD(&rth->rt_uncached); in ip_route_input_slow()
1839 rth->dst.input= ip_error; in ip_route_input_slow()
1840 rth->dst.error= -err; in ip_route_input_slow()
1841 rth->rt_flags &= ~RTCF_LOCAL; in ip_route_input_slow()
1844 if (unlikely(!rt_cache_route(&FIB_RES_NH(res), rth))) { in ip_route_input_slow()
1845 rth->dst.flags |= DST_NOCACHE; in ip_route_input_slow()
1846 rt_add_uncached_list(rth); in ip_route_input_slow()
1849 skb_dst_set(skb, &rth->dst); in ip_route_input_slow()
1941 struct rtable *rth; in __mkroute_output() local
1990 rth = rcu_dereference(*prth); in __mkroute_output()
1991 if (rth && rth->dst.expires && in __mkroute_output()
1992 time_after(jiffies, rth->dst.expires)) { in __mkroute_output()
2008 rth = rcu_dereference(*prth); in __mkroute_output()
2011 if (rt_cache_valid(rth)) { in __mkroute_output()
2012 dst_hold(&rth->dst); in __mkroute_output()
2013 return rth; in __mkroute_output()
2018 rth = rt_dst_alloc(dev_out, in __mkroute_output()
2022 if (!rth) in __mkroute_output()
2025 rth->dst.output = ip_output; in __mkroute_output()
2027 rth->rt_genid = rt_genid_ipv4(dev_net(dev_out)); in __mkroute_output()
2028 rth->rt_flags = flags; in __mkroute_output()
2029 rth->rt_type = type; in __mkroute_output()
2030 rth->rt_is_input = 0; in __mkroute_output()
2031 rth->rt_iif = orig_oif ? : 0; in __mkroute_output()
2032 rth->rt_pmtu = 0; in __mkroute_output()
2033 rth->rt_gateway = 0; in __mkroute_output()
2034 rth->rt_uses_gateway = 0; in __mkroute_output()
2035 INIT_LIST_HEAD(&rth->rt_uncached); in __mkroute_output()
2040 rth->dst.input = ip_local_deliver; in __mkroute_output()
2044 rth->dst.output = ip_mc_output; in __mkroute_output()
2051 rth->dst.input = ip_mr_input; in __mkroute_output()
2052 rth->dst.output = ip_mc_output; in __mkroute_output()
2058 rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0); in __mkroute_output()
2060 return rth; in __mkroute_output()
2073 struct rtable *rth; in __ip_route_output_key() local
2089 rth = ERR_PTR(-EINVAL); in __ip_route_output_key()
2140 rth = ERR_PTR(-ENODEV); in __ip_route_output_key()
2146 rth = ERR_PTR(-ENETUNREACH); in __ip_route_output_key()
2205 rth = ERR_PTR(-ENETUNREACH); in __ip_route_output_key()
2240 rth = __mkroute_output(&res, fl4, orig_oif, dev_out, flags); in __ip_route_output_key()
2244 return rth; in __ip_route_output_key()