Lines Matching refs:res
744 struct fib_result res; in __ip_do_redirect() local
789 if (fib_lookup(net, fl4, &res, 0) == 0) { in __ip_do_redirect()
790 struct fib_nh_common *nhc = FIB_RES_NHC(res); in __ip_do_redirect()
1018 struct fib_result res; in __ip_rt_update_pmtu() local
1037 if (fib_lookup(dev_net(dst->dev), fl4, &res, 0) == 0) { in __ip_rt_update_pmtu()
1038 struct fib_nh_common *nhc = FIB_RES_NHC(res); in __ip_rt_update_pmtu()
1200 int res; in ipv4_send_dest_unreach() local
1216 res = __ip_options_compile(dev_net(skb->dev), &opt, skb, NULL); in ipv4_send_dest_unreach()
1219 if (res) in ipv4_send_dest_unreach()
1262 struct fib_result res; in ip_rt_get_source() local
1274 if (fib_lookup(dev_net(rt->dst.dev), &fl4, &res, 0) == 0) in ip_rt_get_source()
1275 src = fib_result_prefsrc(dev_net(rt->dst.dev), &res); in ip_rt_get_source()
1393 u32 ip_mtu_from_fib_result(struct fib_result *res, __be32 daddr) in ip_mtu_from_fib_result() argument
1395 struct fib_nh_common *nhc = res->nhc; in ip_mtu_from_fib_result()
1397 struct fib_info *fi = res->fi; in ip_mtu_from_fib_result()
1563 const struct fib_result *res, in rt_set_nexthop() argument
1571 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in rt_set_nexthop()
1615 set_class_tag(rt, res->tclassid); in rt_set_nexthop()
1784 const struct fib_result *res, in __mkroute_input() argument
1788 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in __mkroute_input()
1804 err = fib_validate_source(skb, saddr, daddr, tos, FIB_RES_OIF(*res), in __mkroute_input()
1813 do_cache = res->fi && !itag; in __mkroute_input()
1851 rth = rt_dst_alloc(out_dev->dev, 0, res->type, in __mkroute_input()
1864 rt_set_nexthop(rth, daddr, res, fnhe, res->fi, res->type, itag, in __mkroute_input()
2010 struct fib_result *res, in ip_mkroute_input() argument
2016 if (res->fi && fib_info_num_path(res->fi) > 1) { in ip_mkroute_input()
2017 int h = fib_multipath_hash(res->fi->fib_net, NULL, skb, hkeys); in ip_mkroute_input()
2019 fib_select_multipath(res, h); in ip_mkroute_input()
2024 return __mkroute_input(skb, res, in_dev, daddr, saddr, tos); in ip_mkroute_input()
2040 struct fib_result *res) in ip_route_input_slow() argument
2072 res->fi = NULL; in ip_route_input_slow()
2073 res->table = NULL; in ip_route_input_slow()
2118 err = fib_lookup(net, &fl4, res, 0); in ip_route_input_slow()
2125 if (res->type == RTN_BROADCAST) { in ip_route_input_slow()
2134 if (res->type == RTN_LOCAL) { in ip_route_input_slow()
2146 if (res->type != RTN_UNICAST) in ip_route_input_slow()
2150 err = ip_mkroute_input(skb, res, in_dev, daddr, saddr, tos, flkeys); in ip_route_input_slow()
2164 res->type = RTN_BROADCAST; in ip_route_input_slow()
2168 do_cache &= res->fi && !itag; in ip_route_input_slow()
2170 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in ip_route_input_slow()
2181 flags | RTCF_LOCAL, res->type, in ip_route_input_slow()
2193 if (res->type == RTN_UNREACHABLE) { in ip_route_input_slow()
2200 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in ip_route_input_slow()
2218 res->type = RTN_UNREACHABLE; in ip_route_input_slow()
2219 res->fi = NULL; in ip_route_input_slow()
2220 res->table = NULL; in ip_route_input_slow()
2250 struct fib_result res; in ip_route_input_noref() local
2255 err = ip_route_input_rcu(skb, daddr, saddr, tos, dev, &res); in ip_route_input_noref()
2264 u8 tos, struct net_device *dev, struct fib_result *res) in ip_route_input_rcu() argument
2310 return ip_route_input_slow(skb, daddr, saddr, tos, dev, res); in ip_route_input_rcu()
2314 static struct rtable *__mkroute_output(const struct fib_result *res, in __mkroute_output() argument
2319 struct fib_info *fi = res->fi; in __mkroute_output()
2322 u16 type = res->type; in __mkroute_output()
2361 if (fi && res->prefixlen < 4) in __mkroute_output()
2380 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in __mkroute_output()
2432 rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0, do_cache); in __mkroute_output()
2446 struct fib_result res = { in ip_route_output_key_hash() local
2460 rth = ip_route_output_key_hash_rcu(net, fl4, &res, skb); in ip_route_output_key_hash()
2468 struct fib_result *res, in ip_route_output_key_hash_rcu() argument
2565 res->type = RTN_LOCAL; in ip_route_output_key_hash_rcu()
2570 err = fib_lookup(net, fl4, res, 0); in ip_route_output_key_hash_rcu()
2572 res->fi = NULL; in ip_route_output_key_hash_rcu()
2573 res->table = NULL; in ip_route_output_key_hash_rcu()
2598 res->type = RTN_UNICAST; in ip_route_output_key_hash_rcu()
2605 if (res->type == RTN_LOCAL) { in ip_route_output_key_hash_rcu()
2607 if (res->fi->fib_prefsrc) in ip_route_output_key_hash_rcu()
2608 fl4->saddr = res->fi->fib_prefsrc; in ip_route_output_key_hash_rcu()
2614 dev_out = l3mdev_master_dev_rcu(FIB_RES_DEV(*res)) ? : in ip_route_output_key_hash_rcu()
2620 orig_oif = FIB_RES_OIF(*res); in ip_route_output_key_hash_rcu()
2627 fib_select_path(net, res, fl4, skb); in ip_route_output_key_hash_rcu()
2629 dev_out = FIB_RES_DEV(*res); in ip_route_output_key_hash_rcu()
2634 rth = __mkroute_output(res, fl4, orig_oif, dev_out, flags); in ip_route_output_key_hash_rcu()
3084 struct fib_result res = {}; in inet_rtm_getroute() local
3155 dev, &res); in inet_rtm_getroute()
3163 rt = ip_route_output_key_hash_rcu(net, &fl4, &res, skb); in inet_rtm_getroute()
3178 table_id = res.table ? res.table->tb_id : 0; in inet_rtm_getroute()
3187 if (!res.fi) { in inet_rtm_getroute()
3188 err = fib_props[res.type].error; in inet_rtm_getroute()
3195 rt->rt_type, res.prefix, res.prefixlen, in inet_rtm_getroute()
3196 fl4.flowi4_tos, res.fi, 0); in inet_rtm_getroute()