summaryrefslogtreecommitdiff
path: root/include/net/ip_fib.h
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2019-03-28 06:53:48 +0300
committerDavid S. Miller <davem@davemloft.net>2019-03-29 20:48:03 +0300
commite4516ef65490ef29d48a98ad4d7c90dccf39068f (patch)
treed677d96aa377aea0f43abad32fdfc9a446698698 /include/net/ip_fib.h
parent331c7a402358de6206232f6aab7aa48ec6c1088a (diff)
downloadlinux-e4516ef65490ef29d48a98ad4d7c90dccf39068f.tar.xz
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>
Diffstat (limited to 'include/net/ip_fib.h')
-rw-r--r--include/net/ip_fib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index 9c8214d2116d..1af1f552644a 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -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);