mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
net: ipv6: Introduce ip6_multipath_hash_policy()
In order to abstract away access to the ipv6.sysctl.multipath_hash_policy variable, which is not available on systems compiled without IPv6 support, introduce a wrapper function ip6_multipath_hash_policy() that falls back to 0 on non-IPv6 systems. Use this wrapper from mlxsw/spectrum_router instead of a direct reference. Signed-off-by: Petr Machata <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Acked-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
129cf5f7f1
commit
918ee5073b
2 changed files with 12 additions and 1 deletions
|
|
@ -888,6 +888,17 @@ static inline int ip6_default_np_autolabel(struct net *net)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
static inline int ip6_multipath_hash_policy(const struct net *net)
|
||||
{
|
||||
return net->ipv6.sysctl.multipath_hash_policy;
|
||||
}
|
||||
#else
|
||||
static inline int ip6_multipath_hash_policy(const struct net *net)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Header manipulation
|
||||
|
|
|
|||
Loading…
Reference in a new issue