route.c (c757faa8bfa26a0dd24b41ff783e0da042156887) route.c (38fbeeeeccdb38d0635398e8e344d245f6d8dc52)
1/*
2 * Linux INET6 implementation
3 * FIB front-end.
4 *
5 * Authors:
6 * Pedro Roque <roque@di.fc.ul.pt>
7 *
8 * This program is free software; you can redistribute it and/or

--- 2786 unchanged lines hidden (view full) ---

2795 NL_SET_ERR_MSG(extack, "FIB table does not exist");
2796 return err;
2797 }
2798
2799 read_lock_bh(&table->tb6_lock);
2800
2801 fn = fib6_locate(&table->tb6_root,
2802 &cfg->fc_dst, cfg->fc_dst_len,
1/*
2 * Linux INET6 implementation
3 * FIB front-end.
4 *
5 * Authors:
6 * Pedro Roque <roque@di.fc.ul.pt>
7 *
8 * This program is free software; you can redistribute it and/or

--- 2786 unchanged lines hidden (view full) ---

2795 NL_SET_ERR_MSG(extack, "FIB table does not exist");
2796 return err;
2797 }
2798
2799 read_lock_bh(&table->tb6_lock);
2800
2801 fn = fib6_locate(&table->tb6_root,
2802 &cfg->fc_dst, cfg->fc_dst_len,
2803 &cfg->fc_src, cfg->fc_src_len);
2803 &cfg->fc_src, cfg->fc_src_len,
2804 true);
2804
2805 if (fn) {
2806 for (rt = fn->leaf; rt; rt = rt->dst.rt6_next) {
2807 if ((rt->rt6i_flags & RTF_CACHE) &&
2808 !(cfg->fc_flags & RTF_CACHE))
2809 continue;
2810 if (cfg->fc_ifindex &&
2811 (!rt->dst.dev ||

--- 192 unchanged lines hidden (view full) ---

3004 struct rt6_info *rt = NULL;
3005 struct fib6_table *table;
3006
3007 table = fib6_get_table(net, tb_id);
3008 if (!table)
3009 return NULL;
3010
3011 read_lock_bh(&table->tb6_lock);
2805
2806 if (fn) {
2807 for (rt = fn->leaf; rt; rt = rt->dst.rt6_next) {
2808 if ((rt->rt6i_flags & RTF_CACHE) &&
2809 !(cfg->fc_flags & RTF_CACHE))
2810 continue;
2811 if (cfg->fc_ifindex &&
2812 (!rt->dst.dev ||

--- 192 unchanged lines hidden (view full) ---

3005 struct rt6_info *rt = NULL;
3006 struct fib6_table *table;
3007
3008 table = fib6_get_table(net, tb_id);
3009 if (!table)
3010 return NULL;
3011
3012 read_lock_bh(&table->tb6_lock);
3012 fn = fib6_locate(&table->tb6_root, prefix, prefixlen, NULL, 0);
3013 fn = fib6_locate(&table->tb6_root, prefix, prefixlen, NULL, 0, true);
3013 if (!fn)
3014 goto out;
3015
3016 for (rt = fn->leaf; rt; rt = rt->dst.rt6_next) {
3017 if (rt->dst.dev->ifindex != ifindex)
3018 continue;
3019 if ((rt->rt6i_flags & (RTF_ROUTEINFO|RTF_GATEWAY)) != (RTF_ROUTEINFO|RTF_GATEWAY))
3020 continue;

--- 1731 unchanged lines hidden ---
3014 if (!fn)
3015 goto out;
3016
3017 for (rt = fn->leaf; rt; rt = rt->dst.rt6_next) {
3018 if (rt->dst.dev->ifindex != ifindex)
3019 continue;
3020 if ((rt->rt6i_flags & (RTF_ROUTEINFO|RTF_GATEWAY)) != (RTF_ROUTEINFO|RTF_GATEWAY))
3021 continue;

--- 1731 unchanged lines hidden ---