From: Frank Lichtenheld Date: Tue, 21 Oct 2025 19:31:40 +0000 (+0200) Subject: multi: Fix wrong usage of mroute_extract_openvpn_sockaddr X-Git-Tag: v2.7_rc1~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0abf6e716b5a50b2b7f4287b1d50f4889eed36aa;p=thirdparty%2Fopenvpn.git multi: Fix wrong usage of mroute_extract_openvpn_sockaddr maddr.proto needs to be set before the call since that will change the behavior. Found by GCC "'maddr.proto' is used uninitialized" Change-Id: I76babf08b041162ddedf7a9b7c2799847f15cbdc Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Acked-by: Gianmarco De Gregori Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1292 Message-Id: <20251021193147.26778-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg33830.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index e907524f5..fa9c65400 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3965,9 +3965,9 @@ management_callback_kill_by_addr(void *arg, const in_addr_t addr, const int port saddr.addr.in4.sin_family = AF_INET; saddr.addr.in4.sin_addr.s_addr = htonl(addr); saddr.addr.in4.sin_port = htons(port); + maddr.proto = proto; if (mroute_extract_openvpn_sockaddr(&maddr, &saddr, true)) { - maddr.proto = proto; hash_iterator_init(m->iter, &hi); while ((he = hash_iterator_next(&hi))) {