From 092001cc425a41db6e9cb1f8f86b4ffd60aa9b72 Mon Sep 17 00:00:00 2001 From: Jonathan Martin Date: Wed, 25 Jun 2025 10:22:27 -0700 Subject: [PATCH 1/2] Remove unnecessary route delay for Windows 7 and newer. --- src/openvpn/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 7e260696822..4b50d2a991a 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3243,7 +3243,7 @@ options_postprocess_mutate_invariant(struct options *options) /* delay may only be necessary when we perform DHCP handshake */ const bool dhcp = (options->tuntap_options.ip_win32_type == IPW32_SET_DHCP_MASQ) || (options->tuntap_options.ip_win32_type == IPW32_SET_ADAPTIVE); - if ((options->mode == MODE_POINT_TO_POINT) && dhcp) + if ((options->mode == MODE_POINT_TO_POINT) && dhcp && (win32_version_info() <= WIN_VISTA)) { options->route_delay_defined = true; options->route_delay = 5; /* Vista sometimes has a race without this */ From db1dc50996b90872197267e1ae6dcff945bbdf7b Mon Sep 17 00:00:00 2001 From: Jonathan Martin Date: Thu, 26 Jun 2025 09:02:26 -0700 Subject: [PATCH 2/2] Update options.c Remove dead code since Windows Vista and older are no longer supported. --- src/openvpn/options.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 4b50d2a991a..c33172c3309 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3238,18 +3238,6 @@ options_postprocess_mutate_invariant(struct options *options) options->tuntap_options.ip_win32_type = IPW32_SET_NETSH; } - if ((dev == DEV_TYPE_TUN || dev == DEV_TYPE_TAP) && !options->route_delay_defined) - { - /* delay may only be necessary when we perform DHCP handshake */ - const bool dhcp = (options->tuntap_options.ip_win32_type == IPW32_SET_DHCP_MASQ) - || (options->tuntap_options.ip_win32_type == IPW32_SET_ADAPTIVE); - if ((options->mode == MODE_POINT_TO_POINT) && dhcp && (win32_version_info() <= WIN_VISTA)) - { - options->route_delay_defined = true; - options->route_delay = 5; /* Vista sometimes has a race without this */ - } - } - if (options->ifconfig_noexec) { options->tuntap_options.ip_win32_type = IPW32_SET_MANUAL;