Revert "ipv6: per-netns exclusive flowlabel checks"
This reverts commit 4f523f15e5
which is
commit 0b0dff5b3b98c5c7ce848151df9da0b3cdf0cc8b upstream.
It breaks the kernel abi and is not needed for Android systems, so
revert it.
Bug: 161946584
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If9df46769d0f25fcdfe7f4b8df071ade3907fada
This commit is contained in:
parent
79553fad5c
commit
cbfab5c59c
@ -390,20 +390,17 @@ static inline void txopt_put(struct ipv6_txoptions *opt)
|
||||
kfree_rcu(opt, rcu);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
struct ip6_flowlabel *__fl6_sock_lookup(struct sock *sk, __be32 label);
|
||||
|
||||
extern struct static_key_false_deferred ipv6_flowlabel_exclusive;
|
||||
static inline struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk,
|
||||
__be32 label)
|
||||
{
|
||||
if (static_branch_unlikely(&ipv6_flowlabel_exclusive.key) &&
|
||||
READ_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl))
|
||||
if (static_branch_unlikely(&ipv6_flowlabel_exclusive.key))
|
||||
return __fl6_sock_lookup(sk, label) ? : ERR_PTR(-ENOENT);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions *opt_space,
|
||||
struct ip6_flowlabel *fl,
|
||||
|
@ -81,10 +81,9 @@ struct netns_ipv6 {
|
||||
spinlock_t fib6_gc_lock;
|
||||
unsigned int ip6_rt_gc_expire;
|
||||
unsigned long ip6_rt_last_gc;
|
||||
unsigned char flowlabel_has_excl;
|
||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
||||
bool fib6_has_custom_rules;
|
||||
unsigned int fib6_rules_require_fldissect;
|
||||
bool fib6_has_custom_rules;
|
||||
#ifdef CONFIG_IPV6_SUBTREES
|
||||
unsigned int fib6_routes_require_src;
|
||||
#endif
|
||||
|
@ -450,10 +450,8 @@ fl_create(struct net *net, struct sock *sk, struct in6_flowlabel_req *freq,
|
||||
err = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
if (fl_shared_exclusive(fl) || fl->opt) {
|
||||
WRITE_ONCE(sock_net(sk)->ipv6.flowlabel_has_excl, 1);
|
||||
if (fl_shared_exclusive(fl) || fl->opt)
|
||||
static_branch_deferred_inc(&ipv6_flowlabel_exclusive);
|
||||
}
|
||||
return fl;
|
||||
|
||||
done:
|
||||
|
Loading…
Reference in New Issue
Block a user