Message ID | 20181219202611.2144-4-simon@rozman.si |
---|---|
State | Accepted |
Headers | show |
Series | [Openvpn-devel,1/4] Make DriverCertification MSI property public | expand |
Acked-by: Gert Doering <gert@greenie.muc.de> Looks reasonable. Plus, correct error message :-) Your patch has been applied to the master branch. commit 91bc1212b4b79ac9e2cbf6d345db5df716c42a5b Author: Simon Rozman Date: Wed Dec 19 21:26:11 2018 +0100 Detect missing TAP driver and bail out gracefully Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20181219202611.2144-4-simon@rozman.si> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18038.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/tapctl/tap.c b/src/tapctl/tap.c index 790a4956..ed3c6e0b 100644 --- a/src/tapctl/tap.c +++ b/src/tapctl/tap.c @@ -460,7 +460,7 @@ tap_create_interface( &devinfo_data)) { dwResult = GetLastError(); - msg(M_NONFATAL, "%s: SetupDiClassNameFromGuid failed", __FUNCTION__); + msg(M_NONFATAL, "%s: SetupDiCreateDeviceInfo failed", __FUNCTION__); goto cleanup_hDevInfoList; } @@ -596,6 +596,13 @@ tap_create_interface( free(drvinfo_detail_data); } + if (dwlDriverVersion == 0) + { + dwResult = ERROR_NOT_FOUND; + msg(M_NONFATAL, "%s: No driver for device \"%" PRIsLPTSTR "\" installed.", __FUNCTION__, szzHardwareIDs); + goto cleanup_DriverInfoList; + } + /* Call appropriate class installer. */ if (!SetupDiCallClassInstaller( DIF_REGISTERDEVICE,