]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
sctp: Initialize daddr on peeled off socket
authorPetr Malat <oss@malat.biz>
Sat, 9 Apr 2022 06:36:11 +0000 (08:36 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 10:00:49 +0000 (12:00 +0200)
commit74c33d48b03c6b774f1ae10e25029b7a2194f0bb
treeb6b0ee306ac5a8b8f3b17d57851d488f53b75781
parent97ae74d34f9e547e3733a35a992821d89a23af3b
sctp: Initialize daddr on peeled off socket

BugLink: https://bugs.launchpad.net/bugs/1969857
[ Upstream commit 8467dda0c26583547731e7f3ea73fc3856bae3bf ]

Function sctp_do_peeloff() wrongly initializes daddr of the original
socket instead of the peeled off socket, which makes getpeername()
return zeroes instead of the primary address. Initialize the new socket
instead.

Fixes: d570ee490fb1 ("[SCTP]: Correctly set daddr for IPv6 sockets during peeloff")
Signed-off-by: Petr Malat <oss@malat.biz>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Link: https://lore.kernel.org/r/20220409063611.673193-1-oss@malat.biz
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/sctp/socket.c