Attention is currently required from: flichtenheld, plaisthos.
Hello plaisthos, flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1363?usp=email
to review the following change.
Change subject: iservice: use saved iface index to restore metric
......................................................................
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: [email protected]
Change-Id: Ia74a931c703d594bdf8ccada9b783b94608de278
Signed-off-by: Heiko Hund <[email protected]>
---
M src/openvpnserv/interactive.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/63/1363/1
diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
index 0712986..46274ce 100644
--- a/src/openvpnserv/interactive.c
+++ b/src/openvpnserv/interactive.c
@@ -762,11 +762,11 @@
err = delete_wfp_block_filters(block_data->engine);
if (block_data->metric_v4 >= 0)
{
- set_interface_metric(msg->iface.index, AF_INET,
block_data->metric_v4);
+ set_interface_metric(block_data->index, AF_INET,
block_data->metric_v4);
}
if (block_data->metric_v6 >= 0)
{
- set_interface_metric(msg->iface.index, AF_INET6,
block_data->metric_v6);
+ set_interface_metric(block_data->index, AF_INET6,
block_data->metric_v6);
}
free(block_data);
}
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1363?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia74a931c703d594bdf8ccada9b783b94608de278
Gerrit-Change-Number: 1363
Gerrit-PatchSet: 1
Gerrit-Owner: d12fk <[email protected]>
Gerrit-Reviewer: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel