Skip to content

Remove unnecessary route delay for Windows 7 and newer. #772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/openvpn/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -3228,7 +3228,7 @@
options_postprocess_mutate_invariant(struct options *options)
{
#ifdef _WIN32
const int dev = dev_type_enum(options->dev, options->dev_type);

Check failure on line 3231 in src/openvpn/options.c

View workflow job for this annotation

GitHub Actions / gcc-mingw - x86 - OSSL

unused variable ‘dev’ [-Werror=unused-variable]

Check failure on line 3231 in src/openvpn/options.c

View workflow job for this annotation

GitHub Actions / gcc-mingw - x64 - OSSL

unused variable ‘dev’ [-Werror=unused-variable]

/* when using ovpn-dco, kernel doesn't send DHCP requests, so don't use it */
if ((options->windows_driver == DRIVER_DCO)
Expand All @@ -3238,18 +3238,6 @@
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)
{
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;
Expand Down
Loading