]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix IPv6 in port-share journal
authorcorubba <corubba@gmx.de>
Sat, 7 Dec 2024 23:17:05 +0000 (00:17 +0100)
committerGert Doering <gert@greenie.muc.de>
Sun, 8 Dec 2024 13:56:19 +0000 (14:56 +0100)
commitdbc0491f20c34cf3b7ab8fe2a55442ea93007ddd
tree7fd0e2769c12582c08182b0c0aec2d9231795779
parent91b6e288a49ee57a4eeeff3f22f2440c94594a1d
Fix IPv6 in port-share journal

getpeername() and getsockname() will truncate the result if it is
larger than the passed-in length. Because here always the size of the
`sa` IPv4 union member was passed in, all larger (aka IPv6) results
were truncated. Instead use the size of the `addr` union, which is the
maximum size of all union members.

The bug was introduced in 0b6450c9.

Trac: #1358

Signed-off-by: corubba <corubba@gmx.de>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <8de5660b-d917-4092-8871-250495d8c7a4@gmx.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg30035.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/ps.c