Lines Matching refs:rt6_info
79 static void ip6_rt_copy_init(struct rt6_info *rt, struct rt6_info *ort);
98 static void rt6_dst_from_metrics_check(struct rt6_info *rt);
99 static int rt6_score_route(struct rt6_info *rt, int oif, int strict);
102 static struct rt6_info *rt6_add_route_info(struct net *net,
106 static struct rt6_info *rt6_get_route_info(struct net *net,
118 static void rt6_uncached_list_add(struct rt6_info *rt) in rt6_uncached_list_add()
130 static void rt6_uncached_list_del(struct rt6_info *rt) in rt6_uncached_list_del()
151 struct rt6_info *rt; in rt6_uncached_list_flush_dev()
173 static u32 *rt6_pcpu_cow_metrics(struct rt6_info *rt) in rt6_pcpu_cow_metrics()
180 struct rt6_info *rt = (struct rt6_info *)dst; in ipv6_cow_metrics()
190 static inline const void *choose_neigh_daddr(struct rt6_info *rt, in choose_neigh_daddr()
207 struct rt6_info *rt = (struct rt6_info *) dst; in ip6_neigh_lookup()
268 static const struct rt6_info ip6_null_entry_template = {
285 static const struct rt6_info ip6_prohibit_entry_template = {
300 static const struct rt6_info ip6_blk_hole_entry_template = {
317 static void rt6_info_init(struct rt6_info *rt) in rt6_info_init()
327 static struct rt6_info *__ip6_dst_alloc(struct net *net, in __ip6_dst_alloc()
331 struct rt6_info *rt = dst_alloc(&net->ipv6.ip6_dst_ops, dev, in __ip6_dst_alloc()
340 static struct rt6_info *ip6_dst_alloc(struct net *net, in ip6_dst_alloc()
344 struct rt6_info *rt = __ip6_dst_alloc(net, dev, flags); in ip6_dst_alloc()
347 rt->rt6i_pcpu = alloc_percpu_gfp(struct rt6_info *, GFP_ATOMIC); in ip6_dst_alloc()
352 struct rt6_info **p; in ip6_dst_alloc()
369 struct rt6_info *rt = (struct rt6_info *)dst; in ip6_dst_destroy()
390 struct rt6_info *rt = (struct rt6_info *)dst; in ip6_dst_ifdown()
407 static bool __rt6_check_expired(const struct rt6_info *rt) in __rt6_check_expired()
415 static bool rt6_check_expired(const struct rt6_info *rt) in rt6_check_expired()
421 return rt6_check_expired((struct rt6_info *) rt->dst.from); in rt6_check_expired()
436 static struct rt6_info *rt6_multipath_select(struct rt6_info *match, in rt6_multipath_select()
440 struct rt6_info *sibling, *next_sibling; in rt6_multipath_select()
465 static inline struct rt6_info *rt6_device_match(struct net *net, in rt6_device_match()
466 struct rt6_info *rt, in rt6_device_match()
471 struct rt6_info *local = NULL; in rt6_device_match()
472 struct rt6_info *sprt; in rt6_device_match()
531 static void rt6_probe(struct rt6_info *rt) in rt6_probe()
578 static inline void rt6_probe(struct rt6_info *rt) in rt6_probe()
586 static inline int rt6_check_dev(struct rt6_info *rt, int oif) in rt6_check_dev()
597 static inline enum rt6_nud_state rt6_check_neigh(struct rt6_info *rt) in rt6_check_neigh()
628 static int rt6_score_route(struct rt6_info *rt, int oif, in rt6_score_route()
647 static struct rt6_info *find_match(struct rt6_info *rt, int oif, int strict, in find_match()
648 int *mpri, struct rt6_info *match, in find_match()
684 static struct rt6_info *find_rr_leaf(struct fib6_node *fn, in find_rr_leaf()
685 struct rt6_info *rr_head, in find_rr_leaf()
689 struct rt6_info *rt, *match, *cont; in find_rr_leaf()
721 static struct rt6_info *rt6_select(struct fib6_node *fn, int oif, int strict) in rt6_select()
723 struct rt6_info *match, *rt0; in rt6_select()
735 struct rt6_info *next = rt0->dst.rt6_next; in rt6_select()
749 static bool rt6_is_gw_or_nonexthop(const struct rt6_info *rt) in rt6_is_gw_or_nonexthop()
763 struct rt6_info *rt; in rt6_route_rcv()
847 static struct rt6_info *ip6_pol_route_lookup(struct net *net, in ip6_pol_route_lookup()
852 struct rt6_info *rt; in ip6_pol_route_lookup()
879 struct rt6_info *rt6_lookup(struct net *net, const struct in6_addr *daddr, in rt6_lookup()
896 return (struct rt6_info *) dst; in rt6_lookup()
910 static int __ip6_ins_rt(struct rt6_info *rt, struct nl_info *info, in __ip6_ins_rt()
924 int ip6_ins_rt(struct rt6_info *rt) in ip6_ins_rt()
932 static struct rt6_info *ip6_rt_cache_alloc(struct rt6_info *ort, in ip6_rt_cache_alloc()
936 struct rt6_info *rt; in ip6_rt_cache_alloc()
943 ort = (struct rt6_info *)ort->dst.from; in ip6_rt_cache_alloc()
972 static struct rt6_info *ip6_rt_pcpu_alloc(struct rt6_info *rt) in ip6_rt_pcpu_alloc()
974 struct rt6_info *pcpu_rt; in ip6_rt_pcpu_alloc()
988 static struct rt6_info *rt6_get_pcpu_route(struct rt6_info *rt) in rt6_get_pcpu_route()
990 struct rt6_info *pcpu_rt, **p; in rt6_get_pcpu_route()
1002 static struct rt6_info *rt6_make_pcpu_route(struct rt6_info *rt) in rt6_make_pcpu_route()
1005 struct rt6_info *pcpu_rt, *prev, **p; in rt6_make_pcpu_route()
1040 static struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table, int oif, in ip6_pol_route()
1044 struct rt6_info *rt; in ip6_pol_route()
1090 struct rt6_info *uncached_rt; in ip6_pol_route()
1109 struct rt6_info *pcpu_rt; in ip6_pol_route()
1133 static struct rt6_info *ip6_pol_route_input(struct net *net, struct fib6_table *table, in ip6_pol_route_input()
1171 static struct rt6_info *ip6_pol_route_output(struct net *net, struct fib6_table *table, in ip6_pol_route_output()
1205 struct rt6_info *rt, *ort = (struct rt6_info *) dst_orig; in ip6_blackhole_route()
1242 static void rt6_dst_from_metrics_check(struct rt6_info *rt) in rt6_dst_from_metrics_check()
1249 static struct dst_entry *rt6_check(struct rt6_info *rt, u32 cookie) in rt6_check()
1260 static struct dst_entry *rt6_dst_from_check(struct rt6_info *rt, u32 cookie) in rt6_dst_from_check()
1264 rt6_check((struct rt6_info *)(rt->dst.from), cookie)) in rt6_dst_from_check()
1272 struct rt6_info *rt; in ip6_dst_check()
1274 rt = (struct rt6_info *) dst; in ip6_dst_check()
1292 struct rt6_info *rt = (struct rt6_info *) dst; in ip6_negative_advice()
1310 struct rt6_info *rt; in ip6_link_failure()
1314 rt = (struct rt6_info *) skb_dst(skb); in ip6_link_failure()
1325 static void rt6_do_update_pmtu(struct rt6_info *rt, u32 mtu) in rt6_do_update_pmtu()
1334 static bool rt6_cache_allowed_for_pmtu(const struct rt6_info *rt) in rt6_cache_allowed_for_pmtu()
1343 struct rt6_info *rt6 = (struct rt6_info *)dst; in __ip6_rt_update_pmtu()
1357 struct rt6_info *nrt6; in __ip6_rt_update_pmtu()
1422 static struct rt6_info *__ip6_route_redirect(struct net *net, in __ip6_route_redirect()
1428 struct rt6_info *rt; in __ip6_route_redirect()
1563 const struct rt6_info *rt = (const struct rt6_info *)dst; in ip6_mtu()
1593 struct rt6_info *rt; in icmp6_dst_alloc()
1652 static void icmp6_clean_all(int (*func)(struct rt6_info *rt, void *arg), in icmp6_clean_all()
1660 struct rt6_info *rt = (struct rt6_info *) dst; in icmp6_clean_all()
1751 static struct rt6_info *ip6_route_info_create(struct fib6_config *cfg) in ip6_route_info_create()
1754 struct rt6_info *rt = NULL; in ip6_route_info_create()
1922 struct rt6_info *grt; in ip6_route_info_create()
2000 struct rt6_info *rt; in ip6_route_add()
2026 static int __ip6_del_rt(struct rt6_info *rt, struct nl_info *info) in __ip6_del_rt()
2048 int ip6_del_rt(struct rt6_info *rt) in ip6_del_rt()
2060 struct rt6_info *rt; in ip6_route_del()
2101 struct rt6_info *rt, *nrt = NULL; in rt6_do_redirect()
2159 rt = (struct rt6_info *) dst; in rt6_do_redirect()
2206 rt = (struct rt6_info *) dst_clone(&rt->dst); in rt6_do_redirect()
2218 static void rt6_set_from(struct rt6_info *rt, struct rt6_info *from) in rt6_set_from()
2228 static void ip6_rt_copy_init(struct rt6_info *rt, struct rt6_info *ort) in ip6_rt_copy_init()
2251 static struct rt6_info *rt6_get_route_info(struct net *net, in rt6_get_route_info()
2256 struct rt6_info *rt = NULL; in rt6_get_route_info()
2283 static struct rt6_info *rt6_add_route_info(struct net *net, in rt6_add_route_info()
2313 struct rt6_info *rt6_get_dflt_router(const struct in6_addr *addr, struct net_device *dev) in rt6_get_dflt_router()
2315 struct rt6_info *rt; in rt6_get_dflt_router()
2335 struct rt6_info *rt6_add_dflt_router(const struct in6_addr *gwaddr, in rt6_add_dflt_router()
2359 struct rt6_info *rt; in rt6_purge_dflt_routers()
2493 struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, in addrconf_dst_alloc()
2499 struct rt6_info *rt = ip6_dst_alloc(net, net->loopback_dev, in addrconf_dst_alloc()
2530 struct rt6_info *rt, in ip6_route_get_saddr()
2553 static int fib6_remove_prefsrc(struct rt6_info *rt, void *arg) in fib6_remove_prefsrc()
2583 static int fib6_clean_tohost(struct rt6_info *rt, void *arg) in fib6_clean_tohost()
2605 static int fib6_ifdown(struct rt6_info *rt, void *arg) in fib6_ifdown()
2635 static int rt6_mtu_change_route(struct rt6_info *rt, void *p_arg) in rt6_mtu_change_route()
2809 struct rt6_info *rt6_info; member
2827 struct rt6_info *rt, struct fib6_config *r_cfg) in ip6_route_info_append()
2830 struct rt6_info *rtnh; in ip6_route_info_append()
2835 rtnh = nh->rt6_info; in ip6_route_info_append()
2847 nh->rt6_info = rt; in ip6_route_info_append()
2863 struct rt6_info *rt; in ip6_route_multipath_add()
2918 err = __ip6_ins_rt(nh->rt6_info, &cfg->fc_nlinfo, &nh->mxc); in ip6_route_multipath_add()
2920 nh->rt6_info = NULL; in ip6_route_multipath_add()
2952 if (nh->rt6_info) in ip6_route_multipath_add()
2953 dst_free(&nh->rt6_info->dst); in ip6_route_multipath_add()
3029 static inline size_t rt6_nlmsg_size(struct rt6_info *rt) in rt6_nlmsg_size()
3048 struct sk_buff *skb, struct rt6_info *rt, in rt6_fill_node()
3207 int rt6_dump_route(struct rt6_info *rt, void *p_arg) in rt6_dump_route()
3228 struct rt6_info *rt; in inet6_rtm_getroute()
3279 rt = (struct rt6_info *)ip6_route_input_lookup(net, dev, &fl6, in inet6_rtm_getroute()
3289 rt = (struct rt6_info *)ip6_route_output(net, NULL, &fl6); in inet6_rtm_getroute()
3320 void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info, in inet6_rt_notify()
3682 kmem_cache_create("ip6_dst_cache", sizeof(struct rt6_info), 0, in ip6_route_init()