aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2019-03-27 20:53:48 -0700
committerDavid S. Miller <davem@davemloft.net>2019-03-29 10:48:03 -0700
commite4516ef65490ef29d48a98ad4d7c90dccf39068f (patch)
treed677d96aa377aea0f43abad32fdfc9a446698698 /include
parentipv4: Move IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN to helper (diff)
downloadlinux-dev-e4516ef65490ef29d48a98ad4d7c90dccf39068f.tar.xz
linux-dev-e4516ef65490ef29d48a98ad4d7c90dccf39068f.zip
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')
-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);