fib_trie.c (c17860a039bbde134324ad6f9331500635f5799d) fib_trie.c (a2bbe6822f8928e254452765c07cb863633113b8)
1/*
2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License
4 * as published by the Free Software Foundation; either version
5 * 2 of the License, or (at your option) any later version.
6 *
7 * Robert Olsson <robert.olsson@its.uu.se> Uppsala Universitet
8 * & Swedish University of Agricultural Sciences.

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

1826 continue;
1827 fa->fa_state |= FA_S_ACCESSED;
1828
1829 if (fi == NULL) {
1830 if (next_fi != res->fi)
1831 break;
1832 } else if (!fib_detect_death(fi, order, &last_resort,
1833 &last_idx, trie_last_dflt)) {
1/*
2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License
4 * as published by the Free Software Foundation; either version
5 * 2 of the License, or (at your option) any later version.
6 *
7 * Robert Olsson <robert.olsson@its.uu.se> Uppsala Universitet
8 * & Swedish University of Agricultural Sciences.

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

1826 continue;
1827 fa->fa_state |= FA_S_ACCESSED;
1828
1829 if (fi == NULL) {
1830 if (next_fi != res->fi)
1831 break;
1832 } else if (!fib_detect_death(fi, order, &last_resort,
1833 &last_idx, trie_last_dflt)) {
1834 if (res->fi)
1835 fib_info_put(res->fi);
1836 res->fi = fi;
1837 atomic_inc(&fi->fib_clntref);
1834 fib_result_assign(res, fi);
1838 trie_last_dflt = order;
1839 goto out;
1840 }
1841 fi = next_fi;
1842 order++;
1843 }
1844 if (order <= 0 || fi == NULL) {
1845 trie_last_dflt = -1;
1846 goto out;
1847 }
1848
1849 if (!fib_detect_death(fi, order, &last_resort, &last_idx, trie_last_dflt)) {
1835 trie_last_dflt = order;
1836 goto out;
1837 }
1838 fi = next_fi;
1839 order++;
1840 }
1841 if (order <= 0 || fi == NULL) {
1842 trie_last_dflt = -1;
1843 goto out;
1844 }
1845
1846 if (!fib_detect_death(fi, order, &last_resort, &last_idx, trie_last_dflt)) {
1850 if (res->fi)
1851 fib_info_put(res->fi);
1852 res->fi = fi;
1853 atomic_inc(&fi->fib_clntref);
1847 fib_result_assign(res, fi);
1854 trie_last_dflt = order;
1855 goto out;
1856 }
1848 trie_last_dflt = order;
1849 goto out;
1850 }
1857 if (last_idx >= 0) {
1858 if (res->fi)
1859 fib_info_put(res->fi);
1860 res->fi = last_resort;
1861 if (last_resort)
1862 atomic_inc(&last_resort->fib_clntref);
1863 }
1851 if (last_idx >= 0)
1852 fib_result_assign(res, last_resort);
1864 trie_last_dflt = last_idx;
1865 out:;
1866 rcu_read_unlock();
1867}
1868
1869static int fn_trie_dump_fa(t_key key, int plen, struct list_head *fah, struct fib_table *tb,
1870 struct sk_buff *skb, struct netlink_callback *cb)
1871{

--- 679 unchanged lines hidden ---
1853 trie_last_dflt = last_idx;
1854 out:;
1855 rcu_read_unlock();
1856}
1857
1858static int fn_trie_dump_fa(t_key key, int plen, struct list_head *fah, struct fib_table *tb,
1859 struct sk_buff *skb, struct netlink_callback *cb)
1860{

--- 679 unchanged lines hidden ---