Skip to content

Commit 0abf6e7

Browse files
flichtenheldcron2
authored andcommitted
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 <[email protected]> Acked-by: Gert Doering <[email protected]> Acked-by: Gianmarco De Gregori <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1292 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg33830.html Signed-off-by: Gert Doering <[email protected]>
1 parent 3e76d8f commit 0abf6e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openvpn/multi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3965,9 +3965,9 @@ management_callback_kill_by_addr(void *arg, const in_addr_t addr, const int port
39653965
saddr.addr.in4.sin_family = AF_INET;
39663966
saddr.addr.in4.sin_addr.s_addr = htonl(addr);
39673967
saddr.addr.in4.sin_port = htons(port);
3968+
maddr.proto = proto;
39683969
if (mroute_extract_openvpn_sockaddr(&maddr, &saddr, true))
39693970
{
3970-
maddr.proto = proto;
39713971
hash_iterator_init(m->iter, &hi);
39723972
while ((he = hash_iterator_next(&hi)))
39733973
{

0 commit comments

Comments
 (0)