ipv4: move fib4_has_custom_rules() helper to public header

So that we can use it in the next patch.
Additionally constify the helper argument.

Suggested-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Paolo Abeni
2019-11-20 13:47:36 +01:00
committed by David S. Miller
parent 197dbf24e3
commit c43c3d76c0
2 changed files with 10 additions and 10 deletions

View File

@@ -311,6 +311,11 @@ static inline int fib_lookup(struct net *net, const struct flowi4 *flp,
return err;
}
static inline bool fib4_has_custom_rules(const struct net *net)
{
return false;
}
static inline bool fib4_rule_default(const struct fib_rule *rule)
{
return true;
@@ -378,6 +383,11 @@ out:
return err;
}
static inline bool fib4_has_custom_rules(const struct net *net)
{
return net->ipv4.fib_has_custom_rules;
}
bool fib4_rule_default(const struct fib_rule *rule);
int fib4_rules_dump(struct net *net, struct notifier_block *nb,
struct netlink_ext_ack *extack);