ipv4: Create init helper for fib_nh
Consolidate the fib_nh initialization which is duplicated between fib_create_info for single path and fib_get_nhs for multipath. Export the helper to allow for use with nexthop objects in the future. Signed-off-by: David Ahern <dsahern@gmail.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
331c7a4023
commit
e4516ef654
@@ -416,6 +416,10 @@ void fib_select_multipath(struct fib_result *res, int hash);
|
||||
void fib_select_path(struct net *net, struct fib_result *res,
|
||||
struct flowi4 *fl4, const struct sk_buff *skb);
|
||||
|
||||
int fib_nh_init(struct net *net, struct fib_nh *fib_nh,
|
||||
struct fib_config *cfg, int nh_weight,
|
||||
struct netlink_ext_ack *extack);
|
||||
|
||||
/* Exported by fib_trie.c */
|
||||
void fib_trie_init(void);
|
||||
struct fib_table *fib_trie_table(u32 id, struct fib_table *alias);
|
||||
|
Reference in New Issue
Block a user