Commit 2a1ddc67 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Revert "sock: Reset dst when changing sk_mark via setsockopt"

This reverts commit 597b389b which is
commit 50254256 upstream.

It breaks a number of runtime Android networking tests, so something is
wrong with the backport, or something else also needed to be backported
at the same time.  So I'm dropping this from the tree as regressions are
not good.

Cc: David Barmann <david.barmann@stackpath.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 95e55e41
......@@ -945,12 +945,10 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
clear_bit(SOCK_PASSSEC, &sock->flags);
break;
case SO_MARK:
if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) {
if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN))
ret = -EPERM;
} else if (val != sk->sk_mark) {
else
sk->sk_mark = val;
sk_dst_reset(sk);
}
break;
case SO_RXQ_OVFL:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment