]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
Load wintun.dll from the application directory only
authorDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Wed, 8 Dec 2021 08:21:06 +0000 (09:21 +0100)
committerDaniel Lenski <dlenski@gmail.com>
Thu, 9 Dec 2021 01:36:23 +0000 (17:36 -0800)
commit59d3e370270e16f80bdad39d2739df1973a1ad82
tree2546d05f622b172e2771680ab5b4fa3ca7b90887
parentbd6a7e7155dc9f78f4a4f79633d7e4447090b369
Load wintun.dll from the application directory only

Do not attempt to load it from the System32 directory.

Different versions of `wintun.dll` or `wintun.sys` float around in system
directories. In my case, a `C:\Windows\System32\wintun.sys` had been left
behind for some reason, and was being loaded at startup, taking precedence
over the `wintun.dll` bundled with OpenConnect. Unfortunately, different
versions are not compatible, at least not entirely, while OpenConnect is
being tested with the bundled `wintun.dll` only.

To avoid this DLL hell, we shall load exclusively the bundled version of
`wintun.dll` from the application directory, and disregard any `wintun.dll`
or `wintun.sys` installed in system directories by other software.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
wintun.c