Just a small suggestion: I think the following will work:

- Check the version of the current operating system.
- Dynamically loading related DLLs (in this case, should be WFP-related
libraries) using LoadLibrary() only if OpenVPN is running Windows Vista+,
and pops a warning for XP users who has that option enabled.
- On Vista+, get addresses of those APIs that we want to call (via
GetProcAddress() ), and then use them as function pointers.

Pros: one binary works for all Windows.
Cons: the code is a bit messier. 

I've done this before for my own projects that must be running on both XP
and later versions of Windows, and it works reliably. I can look into this
later this week (if ValdikSS doesn't have cycles).

Best,
Fish

-----Original Message-----
From: Gert Doering [mailto:g...@greenie.muc.de] 
Sent: Wednesday, November 25, 2015 6:55 AM
To: Arne Schwabe <a...@rfc2549.org>
Cc: openvpn-devel <openvpn-devel@lists.sourceforge.net>
Subject: Re: [Openvpn-devel] [PATCH v4-master] Add Windows DNS Leak fix
using WFP ('block-outside-dns')

Hi,

On Wed, Nov 25, 2015 at 03:19:51PM +0100, Arne Schwabe wrote:
> I am not sure if we want to ship separate WIN XP and Vista+ versions.

We are in agremeent that we do *not* want that :-) - but we *do* want this 
patch to work around Win10 DNS brokenness, and that binary won't run on XP.

Which of the options do we want less...?

gert

-- 
USENET is *not* the non-clickable part of WWW!

//www.muc.de/~gert/
Gert Doering - Munich, Germany
g...@greenie.muc.de
fax: +49-89-35655025
g...@net.informatik.tu-muenchen.de


Reply via email to