From: Gert Doering Date: Tue, 21 Oct 2025 21:31:40 +0200 Message-ID: <20251021193147.26778-1-gert@...1296...> In-Reply-To: References: MIME-Version: 1.0 Subject: [Openvpn-devel] [PATCH v2] multi: Fix wrong usage of mroute_extract_openvpn_sockaddr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel@lists.sourceforge.net From: Frank Lichtenheld 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 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1292 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering Gianmarco De Gregori diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index e907524..fa9c654 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3965,9 +3965,9 @@ 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))) {