#53 Support TAP32 version 0901 as well

This commit is contained in:
Erik Ekman 2009-03-21 12:51:59 +00:00
parent 7c02e0880e
commit bd49866e29
3 changed files with 6 additions and 3 deletions

View file

@ -18,6 +18,7 @@ CHANGES:
- Increase default interface MTU to 1200. - Increase default interface MTU to 1200.
- Fix autoprobing error making every third probe fail, set IP flag - Fix autoprobing error making every third probe fail, set IP flag
Dont-Fragment where supported. Fixes #54. Dont-Fragment where supported. Fixes #54.
- Added TAP32 version 0901 as accepted (#53).
2009-01-23: 0.5.0 "iPassed" 2009-01-23: 0.5.0 "iPassed"
- Fixed segfault in server when sending version reject. - Fixed segfault in server when sending version reject.

View file

@ -49,7 +49,7 @@ cross-compile.
== Results of crappy Win32 API: == Results of crappy Win32 API:
The following fixable limitations apply: The following fixable limitations apply:
- Exactly one TAP32 interface must be installed - Exactly one TAP32 interface must be installed
- The TAP32 interface must be named "dns" and be version 0801 - The TAP32 interface must be named "dns" and be version 0801 or 0901
- Server cannot read packet destination address - Server cannot read packet destination address
The following (probably) un-fixable limitations apply: The following (probably) un-fixable limitations apply:

View file

@ -38,7 +38,8 @@ struct tun_data data;
#define TAP_ADAPTER_KEY "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}" #define TAP_ADAPTER_KEY "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}"
#define TAP_DEVICE_SPACE "\\\\.\\Global\\" #define TAP_DEVICE_SPACE "\\\\.\\Global\\"
#define TAP_COMPONENT_ID "tap0801" #define TAP_VERSION_ID_0801 "tap0801"
#define TAP_VERSION_ID_0901 "tap0901"
#define KEY_COMPONENT_ID "ComponentId" #define KEY_COMPONENT_ID "ComponentId"
#define NET_CFG_INST_ID "NetCfgInstanceId" #define NET_CFG_INST_ID "NetCfgInstanceId"
#else #else
@ -205,7 +206,8 @@ get_device(char *device, int device_len)
if (status != ERROR_SUCCESS || datatype != REG_SZ) { if (status != ERROR_SUCCESS || datatype != REG_SZ) {
goto next; goto next;
} }
if (strncmp(TAP_COMPONENT_ID, component, strlen(TAP_COMPONENT_ID)) == 0) { if (strncmp(TAP_VERSION_ID_0801, component, strlen(TAP_VERSION_ID_0801)) == 0 ||
strncmp(TAP_VERSION_ID_0901, component, strlen(TAP_VERSION_ID_0901)) == 0) {
/* We found a TAP32 device, get its NetCfgInstanceId */ /* We found a TAP32 device, get its NetCfgInstanceId */
char iid_string[256] = NET_CFG_INST_ID; char iid_string[256] = NET_CFG_INST_ID;