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 <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Gianmarco De Gregori <gianmarco@mandelbit.com>
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 <gert@greenie.muc.de>
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)))
{