]> git.feebdaed.xyz Git - 0xmirror/openvpn.git/commit
iservice: use saved iface index to restore metric
authorHeiko Hund <heiko@ist.eigentlich.net>
Wed, 12 Nov 2025 21:51:00 +0000 (22:51 +0100)
committerGert Doering <gert@greenie.muc.de>
Fri, 14 Nov 2025 20:57:36 +0000 (21:57 +0100)
commita1d4a79487ec0089ee01ab635921761933e4e1d6
treea4fc2db0bdaf64daeda29a118b237f776d01dd4a
parentc716b3b8bf5945e326c5ac7a8b04de9c0c6a4c8f
iservice: use saved iface index to restore metric

When adding block rules, the interface metric of the VPN adapter is
temporarily modified so that an old version of Windows 10 would pick
it up first when looking up stuff via DNS. These metrics are reverted to
the old value when the block is removed.

When reverting them, instead of using the stored interface index where
the original values were read from, we were using the interface index
passed to the service with the wfp block message. That index could
theoretically be different from the one stored, which would result in
the metric being set to the wrong interface.

Reported-by: stephan@srlabs.de
Change-Id: Ia74a931c703d594bdf8ccada9b783b94608de278
Signed-off-by: Heiko Hund <heiko@ist.eigentlich.net>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1363
Message-Id: <20251112215106.14182-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34400.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpnserv/interactive.c