mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
ipv4: Remember FIB alias list head and table in lookup results.
This will be used later to implement fib_select_default() in a completely generic manner, instead of the current situation where the default route is re-looked up in the TRIE/HASH table and then the available aliases are analyzed. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a5e3c2aae2
commit
5b4704419c
5 changed files with 14 additions and 8 deletions
|
@ -889,8 +889,9 @@ failure:
|
|||
}
|
||||
|
||||
/* Note! fib_semantic_match intentionally uses RCU list functions. */
|
||||
int fib_semantic_match(struct list_head *head, const struct flowi *flp,
|
||||
struct fib_result *res, int prefixlen, int fib_flags)
|
||||
int fib_semantic_match(struct fib_table *tb, struct list_head *head,
|
||||
const struct flowi *flp, struct fib_result *res,
|
||||
int prefixlen, int fib_flags)
|
||||
{
|
||||
struct fib_alias *fa;
|
||||
int nh_sel = 0;
|
||||
|
@ -954,6 +955,8 @@ out_fill_res:
|
|||
res->type = fa->fa_type;
|
||||
res->scope = fa->fa_scope;
|
||||
res->fi = fa->fa_info;
|
||||
res->table = tb;
|
||||
res->fa_head = head;
|
||||
if (!(fib_flags & FIB_LOOKUP_NOREF))
|
||||
atomic_inc(&res->fi->fib_clntref);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue