Skip to content
Open
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion src/openvpn/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't support anything older than Vista anymore and probably not even Vista at this point. So you really would need to remove the whole block instead, instead of basically making is dead code.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't aware Win7 was the minimum supported OS now. I have removed the dead code. With respect to concluding this code is no longer necessary; our Windscribe desktop application has been running with this change in production since late 2021, with ~25000 daily active OpenVPN connections. Prior to making this change, we observed a substantial delay when initializing the tunnel on Windows. Removing this 5s delay, and another one that has already been fixed by OpenVPN, resolved this delay.

{
options->route_delay_defined = true;
options->route_delay = 5; /* Vista sometimes has a race without this */
Expand Down