Lines Matching refs:res
764 struct fib_result res; in __ip_do_redirect() local
809 if (fib_lookup(net, fl4, &res, 0) == 0) { in __ip_do_redirect()
812 fib_select_path(net, &res, fl4, skb); in __ip_do_redirect()
813 nhc = FIB_RES_NHC(res); in __ip_do_redirect()
1041 struct fib_result res; in __ip_rt_update_pmtu() local
1060 if (fib_lookup(net, fl4, &res, 0) == 0) { in __ip_rt_update_pmtu()
1063 fib_select_path(net, &res, fl4, NULL); in __ip_rt_update_pmtu()
1064 nhc = FIB_RES_NHC(res); in __ip_rt_update_pmtu()
1226 int res; in ipv4_send_dest_unreach() local
1243 res = __ip_options_compile(dev_net(dev), &opt, skb, NULL); in ipv4_send_dest_unreach()
1246 if (res) in ipv4_send_dest_unreach()
1289 struct fib_result res; in ip_rt_get_source() local
1301 if (fib_lookup(dev_net(rt->dst.dev), &fl4, &res, 0) == 0) in ip_rt_get_source()
1302 src = fib_result_prefsrc(dev_net(rt->dst.dev), &res); in ip_rt_get_source()
1421 u32 ip_mtu_from_fib_result(struct fib_result *res, __be32 daddr) in ip_mtu_from_fib_result() argument
1423 struct fib_nh_common *nhc = res->nhc; in ip_mtu_from_fib_result()
1425 struct fib_info *fi = res->fi; in ip_mtu_from_fib_result()
1591 const struct fib_result *res, in rt_set_nexthop() argument
1599 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in rt_set_nexthop()
1643 set_class_tag(rt, res->tclassid); in rt_set_nexthop()
1813 const struct fib_result *res, in __mkroute_input() argument
1817 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in __mkroute_input()
1833 err = fib_validate_source(skb, saddr, daddr, tos, FIB_RES_OIF(*res), in __mkroute_input()
1842 do_cache = res->fi && !itag; in __mkroute_input()
1880 rth = rt_dst_alloc(out_dev->dev, 0, res->type, in __mkroute_input()
1893 rt_set_nexthop(rth, daddr, res, fnhe, res->fi, res->type, itag, in __mkroute_input()
2039 struct fib_result *res, in ip_mkroute_input() argument
2045 if (res->fi && fib_info_num_path(res->fi) > 1) { in ip_mkroute_input()
2046 int h = fib_multipath_hash(res->fi->fib_net, NULL, skb, hkeys); in ip_mkroute_input()
2048 fib_select_multipath(res, h); in ip_mkroute_input()
2053 return __mkroute_input(skb, res, in_dev, daddr, saddr, tos); in ip_mkroute_input()
2069 struct fib_result *res) in ip_route_input_slow() argument
2101 res->fi = NULL; in ip_route_input_slow()
2102 res->table = NULL; in ip_route_input_slow()
2148 err = fib_lookup(net, &fl4, res, 0); in ip_route_input_slow()
2155 if (res->type == RTN_BROADCAST) { in ip_route_input_slow()
2164 if (res->type == RTN_LOCAL) { in ip_route_input_slow()
2176 if (res->type != RTN_UNICAST) in ip_route_input_slow()
2180 err = ip_mkroute_input(skb, res, in_dev, daddr, saddr, tos, flkeys); in ip_route_input_slow()
2194 res->type = RTN_BROADCAST; in ip_route_input_slow()
2198 do_cache &= res->fi && !itag; in ip_route_input_slow()
2200 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in ip_route_input_slow()
2211 flags | RTCF_LOCAL, res->type, in ip_route_input_slow()
2223 if (res->type == RTN_UNREACHABLE) { in ip_route_input_slow()
2230 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in ip_route_input_slow()
2248 res->type = RTN_UNREACHABLE; in ip_route_input_slow()
2249 res->fi = NULL; in ip_route_input_slow()
2250 res->table = NULL; in ip_route_input_slow()
2280 struct fib_result res; in ip_route_input_noref() local
2285 err = ip_route_input_rcu(skb, daddr, saddr, tos, dev, &res); in ip_route_input_noref()
2294 u8 tos, struct net_device *dev, struct fib_result *res) in ip_route_input_rcu() argument
2340 return ip_route_input_slow(skb, daddr, saddr, tos, dev, res); in ip_route_input_rcu()
2344 static struct rtable *__mkroute_output(const struct fib_result *res, in __mkroute_output() argument
2349 struct fib_info *fi = res->fi; in __mkroute_output()
2352 u16 type = res->type; in __mkroute_output()
2391 if (fi && res->prefixlen < 4) in __mkroute_output()
2410 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in __mkroute_output()
2462 rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0, do_cache); in __mkroute_output()
2476 struct fib_result res = { in ip_route_output_key_hash() local
2490 rth = ip_route_output_key_hash_rcu(net, fl4, &res, skb); in ip_route_output_key_hash()
2498 struct fib_result *res, in ip_route_output_key_hash_rcu() argument
2595 res->type = RTN_LOCAL; in ip_route_output_key_hash_rcu()
2600 err = fib_lookup(net, fl4, res, 0); in ip_route_output_key_hash_rcu()
2602 res->fi = NULL; in ip_route_output_key_hash_rcu()
2603 res->table = NULL; in ip_route_output_key_hash_rcu()
2628 res->type = RTN_UNICAST; in ip_route_output_key_hash_rcu()
2635 if (res->type == RTN_LOCAL) { in ip_route_output_key_hash_rcu()
2637 if (res->fi->fib_prefsrc) in ip_route_output_key_hash_rcu()
2638 fl4->saddr = res->fi->fib_prefsrc; in ip_route_output_key_hash_rcu()
2644 dev_out = l3mdev_master_dev_rcu(FIB_RES_DEV(*res)) ? : in ip_route_output_key_hash_rcu()
2650 orig_oif = FIB_RES_OIF(*res); in ip_route_output_key_hash_rcu()
2657 fib_select_path(net, res, fl4, skb); in ip_route_output_key_hash_rcu()
2659 dev_out = FIB_RES_DEV(*res); in ip_route_output_key_hash_rcu()
2662 rth = __mkroute_output(res, fl4, orig_oif, dev_out, flags); in ip_route_output_key_hash_rcu()
3114 struct fib_result res = {}; in inet_rtm_getroute() local
3186 &res); in inet_rtm_getroute()
3194 rt = ip_route_output_key_hash_rcu(net, &fl4, &res, skb); in inet_rtm_getroute()
3209 table_id = res.table ? res.table->tb_id : 0; in inet_rtm_getroute()
3218 if (!res.fi) { in inet_rtm_getroute()
3219 err = fib_props[res.type].error; in inet_rtm_getroute()
3226 rt->rt_type, res.prefix, res.prefixlen, in inet_rtm_getroute()
3227 fl4.flowi4_tos, res.fi, 0); in inet_rtm_getroute()