]> git.baikalelectronics.ru Git - kernel.git/commit
net: sock: fix in-kernel mark setting
authorAlexander Aring <aahringo@redhat.com>
Mon, 31 May 2021 21:00:30 +0000 (17:00 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Jun 2021 22:18:49 +0000 (15:18 -0700)
commitdd9082f4a9f94280fbbece641bf8fc0a25f71f7a
treec56efd77a351e60ba89dde14070454673b192d2f
parent4ef8d857b5f494e62bce9085031563fda35f9563
net: sock: fix in-kernel mark setting

This patch fixes the in-kernel mark setting by doing an additional
sk_dst_reset() which was introduced by commit 50254256f382 ("sock: Reset
dst when changing sk_mark via setsockopt"). The code is now shared to
avoid any further suprises when changing the socket mark value.

Fixes: 84d1c617402e ("net: sock: add sock_set_mark")
Reported-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c