]> git.baikalelectronics.ru Git - 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)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Apr 2022 03:33:10 +0000 (20:33 -0700)
commitc55c328bf5fae32529feb0a072912fbe014f0fc4
treed358dd9a2a89aaec91f195858684fad7f709f695
parentcb8f19e2fe3b7c756ba9d4a5d29519cd51ef9ba2
sctp: Initialize daddr on peeled off socket

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: 961b64d33a87 ("[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>
net/sctp/socket.c