Commit 27ad469e authored by Petr Malat's avatar Petr Malat Committed by Zheng Zengkai
Browse files

sctp: Initialize daddr on peeled off socket

stable inclusion
from stable-v5.10.112
commit eb8873b324d918eeaa572d08d1d05785f4fb1e0a
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5HL0X

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=eb8873b324d918eeaa572d08d1d05785f4fb1e0a



--------------------------------

[ Upstream commit 8467dda0 ]

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: d570ee49 ("[SCTP]: Correctly set daddr for IPv6 sockets during peeloff")
Signed-off-by: default avatarPetr Malat <oss@malat.biz>
Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Link: https://lore.kernel.org/r/20220409063611.673193-1-oss@malat.biz


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent bb9e69a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment