Browse Source

v4.12-9514-beta

dnobori 11 years ago
parent
commit
75f9836ce5
100 changed files with 733 additions and 134 deletions
  1. 2 0
      src/Cedar/Cedar.c
  2. 8 7
      src/Cedar/Cedar.h
  3. 7 0
      src/Cedar/CedarType.h
  4. 2 0
      src/Cedar/Hub.c
  5. 1 0
      src/Cedar/Hub.h
  6. 9 1
      src/Cedar/Interop_OpenVPN.c
  7. 3 0
      src/Cedar/Interop_OpenVPN.h
  8. 1 1
      src/Cedar/Layer3.c
  9. 43 9
      src/Cedar/Protocol.c
  10. 102 1
      src/Cedar/Radius.c
  11. 13 1
      src/Cedar/Radius.h
  12. 1 1
      src/Cedar/SW.c
  13. 2 2
      src/Cedar/Sam.c
  14. 1 1
      src/Cedar/Sam.h
  15. 51 0
      src/Cedar/Server.c
  16. 1 0
      src/Cedar/Server.h
  17. 19 2
      src/Cedar/UdpAccel.c
  18. 3 3
      src/CurrentBuild.txt
  19. 24 0
      src/Makefile64
  20. 269 1
      src/Mayaqua/Network.c
  21. 18 0
      src/Mayaqua/Network.h
  22. 77 29
      src/Mayaqua/TcpIp.c
  23. 1 0
      src/Mayaqua/TcpIp.h
  24. BIN
      src/bin/hamcore/SeLow_x64.sys
  25. BIN
      src/bin/hamcore/SeLow_x86.sys
  26. 2 2
      src/bin/hamcore/inf/selow_x64/SeLow_x64.inf
  27. BIN
      src/bin/hamcore/inf/selow_x64/inf.cat
  28. 2 2
      src/bin/hamcore/inf/selow_x86/SeLow_x86.inf
  29. BIN
      src/bin/hamcore/inf/selow_x86/inf.cat
  30. 1 1
      src/bin/hamcore/inf/x64/INF_VPN.inf
  31. 1 1
      src/bin/hamcore/inf/x64/INF_VPN10.inf
  32. 1 1
      src/bin/hamcore/inf/x64/INF_VPN100.inf
  33. 1 1
      src/bin/hamcore/inf/x64/INF_VPN101.inf
  34. 1 1
      src/bin/hamcore/inf/x64/INF_VPN102.inf
  35. 1 1
      src/bin/hamcore/inf/x64/INF_VPN103.inf
  36. 1 1
      src/bin/hamcore/inf/x64/INF_VPN104.inf
  37. 1 1
      src/bin/hamcore/inf/x64/INF_VPN105.inf
  38. 1 1
      src/bin/hamcore/inf/x64/INF_VPN106.inf
  39. 1 1
      src/bin/hamcore/inf/x64/INF_VPN107.inf
  40. 1 1
      src/bin/hamcore/inf/x64/INF_VPN108.inf
  41. 1 1
      src/bin/hamcore/inf/x64/INF_VPN109.inf
  42. 1 1
      src/bin/hamcore/inf/x64/INF_VPN11.inf
  43. 1 1
      src/bin/hamcore/inf/x64/INF_VPN110.inf
  44. 1 1
      src/bin/hamcore/inf/x64/INF_VPN111.inf
  45. 1 1
      src/bin/hamcore/inf/x64/INF_VPN112.inf
  46. 1 1
      src/bin/hamcore/inf/x64/INF_VPN113.inf
  47. 1 1
      src/bin/hamcore/inf/x64/INF_VPN114.inf
  48. 1 1
      src/bin/hamcore/inf/x64/INF_VPN115.inf
  49. 1 1
      src/bin/hamcore/inf/x64/INF_VPN116.inf
  50. 1 1
      src/bin/hamcore/inf/x64/INF_VPN117.inf
  51. 1 1
      src/bin/hamcore/inf/x64/INF_VPN118.inf
  52. 1 1
      src/bin/hamcore/inf/x64/INF_VPN119.inf
  53. 1 1
      src/bin/hamcore/inf/x64/INF_VPN12.inf
  54. 1 1
      src/bin/hamcore/inf/x64/INF_VPN120.inf
  55. 1 1
      src/bin/hamcore/inf/x64/INF_VPN121.inf
  56. 1 1
      src/bin/hamcore/inf/x64/INF_VPN122.inf
  57. 1 1
      src/bin/hamcore/inf/x64/INF_VPN123.inf
  58. 1 1
      src/bin/hamcore/inf/x64/INF_VPN124.inf
  59. 1 1
      src/bin/hamcore/inf/x64/INF_VPN125.inf
  60. 1 1
      src/bin/hamcore/inf/x64/INF_VPN126.inf
  61. 1 1
      src/bin/hamcore/inf/x64/INF_VPN127.inf
  62. 1 1
      src/bin/hamcore/inf/x64/INF_VPN13.inf
  63. 1 1
      src/bin/hamcore/inf/x64/INF_VPN14.inf
  64. 1 1
      src/bin/hamcore/inf/x64/INF_VPN15.inf
  65. 1 1
      src/bin/hamcore/inf/x64/INF_VPN16.inf
  66. 1 1
      src/bin/hamcore/inf/x64/INF_VPN17.inf
  67. 1 1
      src/bin/hamcore/inf/x64/INF_VPN18.inf
  68. 1 1
      src/bin/hamcore/inf/x64/INF_VPN19.inf
  69. 1 1
      src/bin/hamcore/inf/x64/INF_VPN2.inf
  70. 1 1
      src/bin/hamcore/inf/x64/INF_VPN20.inf
  71. 1 1
      src/bin/hamcore/inf/x64/INF_VPN21.inf
  72. 1 1
      src/bin/hamcore/inf/x64/INF_VPN22.inf
  73. 1 1
      src/bin/hamcore/inf/x64/INF_VPN23.inf
  74. 1 1
      src/bin/hamcore/inf/x64/INF_VPN24.inf
  75. 1 1
      src/bin/hamcore/inf/x64/INF_VPN25.inf
  76. 1 1
      src/bin/hamcore/inf/x64/INF_VPN26.inf
  77. 1 1
      src/bin/hamcore/inf/x64/INF_VPN27.inf
  78. 1 1
      src/bin/hamcore/inf/x64/INF_VPN28.inf
  79. 1 1
      src/bin/hamcore/inf/x64/INF_VPN29.inf
  80. 1 1
      src/bin/hamcore/inf/x64/INF_VPN3.inf
  81. 1 1
      src/bin/hamcore/inf/x64/INF_VPN30.inf
  82. 1 1
      src/bin/hamcore/inf/x64/INF_VPN31.inf
  83. 1 1
      src/bin/hamcore/inf/x64/INF_VPN32.inf
  84. 1 1
      src/bin/hamcore/inf/x64/INF_VPN33.inf
  85. 1 1
      src/bin/hamcore/inf/x64/INF_VPN34.inf
  86. 1 1
      src/bin/hamcore/inf/x64/INF_VPN35.inf
  87. 1 1
      src/bin/hamcore/inf/x64/INF_VPN36.inf
  88. 1 1
      src/bin/hamcore/inf/x64/INF_VPN37.inf
  89. 1 1
      src/bin/hamcore/inf/x64/INF_VPN38.inf
  90. 1 1
      src/bin/hamcore/inf/x64/INF_VPN39.inf
  91. 1 1
      src/bin/hamcore/inf/x64/INF_VPN4.inf
  92. 1 1
      src/bin/hamcore/inf/x64/INF_VPN40.inf
  93. 1 1
      src/bin/hamcore/inf/x64/INF_VPN41.inf
  94. 1 1
      src/bin/hamcore/inf/x64/INF_VPN42.inf
  95. 1 1
      src/bin/hamcore/inf/x64/INF_VPN43.inf
  96. 1 1
      src/bin/hamcore/inf/x64/INF_VPN44.inf
  97. 1 1
      src/bin/hamcore/inf/x64/INF_VPN45.inf
  98. 1 1
      src/bin/hamcore/inf/x64/INF_VPN46.inf
  99. 1 1
      src/bin/hamcore/inf/x64/INF_VPN47.inf
  100. 1 1
      src/bin/hamcore/inf/x64/INF_VPN48.inf

+ 2 - 0
src/Cedar/Cedar.c

@@ -1663,6 +1663,8 @@ CEDAR *NewCedar(X *server_x, K *server_k)
 
 	c->CurrentRegionLock = NewLock();
 
+	StrCpy(c->OpenVPNDefaultClientOption, sizeof(c->OpenVPNDefaultClientOption), OVPN_DEF_CLIENT_OPTION_STRING);
+
 #ifdef	BETA_NUMBER
 	c->Beta = BETA_NUMBER;
 #endif	// BETA_NUMBER

+ 8 - 7
src/Cedar/Cedar.h

@@ -135,10 +135,10 @@
 
 
 // Version number
-#define	CEDAR_VER					411
+#define	CEDAR_VER					412
 
 // Build Number
-#define	CEDAR_BUILD					9506
+#define	CEDAR_BUILD					9514
 
 // Beta number
 //#define	BETA_NUMBER					3
@@ -158,11 +158,11 @@
 
 // Specifies the build date
 #define	BUILD_DATE_Y		2014
-#define	BUILD_DATE_M		10
-#define	BUILD_DATE_D		22
-#define	BUILD_DATE_HO		19
-#define	BUILD_DATE_MI		51
-#define	BUILD_DATE_SE		55
+#define	BUILD_DATE_M		11
+#define	BUILD_DATE_D		17
+#define	BUILD_DATE_HO		21
+#define	BUILD_DATE_MI		41
+#define	BUILD_DATE_SE		16
 
 // Tolerable time difference
 #define	ALLOW_TIMESTAMP_DIFF		(UINT64)(3 * 24 * 60 * 60 * 1000)
@@ -1052,6 +1052,7 @@ typedef struct CEDAR
 	LOCK *FifoBudgetLock;			// Fifo budget lock
 	UINT FifoBudget;				// Fifo budget
 	bool AcceptOnlyTls;				// Accept only TLS (Disable SSL)
+	char OpenVPNDefaultClientOption[MAX_SIZE];	// OpenVPN Default Client Option String
 } CEDAR;
 
 // Type of CEDAR

+ 7 - 0
src/Cedar/CedarType.h

@@ -137,6 +137,13 @@ typedef struct AUTHRADIUS AUTHRADIUS;
 typedef struct AUTHNT AUTHNT;
 
 
+// ==============================================================
+//   RADIUS
+// ==============================================================
+
+typedef struct RADIUS_LOGIN_OPTION RADIUS_LOGIN_OPTION;
+
+
 // ==============================================================
 //   Listener
 // ==============================================================

+ 2 - 0
src/Cedar/Hub.c

@@ -597,6 +597,7 @@ void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao)
 	GetHubAdminOptionDataAndSet(ao, "DropArpInPrivacyFilterMode", &o->DropArpInPrivacyFilterMode);
 	GetHubAdminOptionDataAndSet(ao, "SuppressClientUpdateNotification", &o->SuppressClientUpdateNotification);
 	GetHubAdminOptionDataAndSet(ao, "FloodingSendQueueBufferQuota", &o->FloodingSendQueueBufferQuota);
+	GetHubAdminOptionDataAndSet(ao, "AssignVLanIdByRadiusAttribute", &o->AssignVLanIdByRadiusAttribute);
 }
 
 // Convert the contents of the HUB_OPTION to data
@@ -662,6 +663,7 @@ void HubOptionStructToData(RPC_ADMIN_OPTION *ao, HUB_OPTION *o, char *hub_name)
 	Add(aol, NewAdminOption("DropArpInPrivacyFilterMode", o->DropArpInPrivacyFilterMode));
 	Add(aol, NewAdminOption("SuppressClientUpdateNotification", o->SuppressClientUpdateNotification));
 	Add(aol, NewAdminOption("FloodingSendQueueBufferQuota", o->FloodingSendQueueBufferQuota));
+	Add(aol, NewAdminOption("AssignVLanIdByRadiusAttribute", o->AssignVLanIdByRadiusAttribute));
 
 	Zero(ao, sizeof(RPC_ADMIN_OPTION));
 

+ 1 - 0
src/Cedar/Hub.h

@@ -275,6 +275,7 @@ struct HUB_OPTION
 	bool DropArpInPrivacyFilterMode;	// Drop ARP packets if the both source and destination session is PrivacyFilter mode
 	bool SuppressClientUpdateNotification;	// Suppress the update notification function on the VPN Client
 	UINT FloodingSendQueueBufferQuota;	// The global quota of send queues of flooding packets
+	bool AssignVLanIdByRadiusAttribute;	// Assign the VLAN ID for the VPN session, by the attribute value of RADIUS
 };
 
 // MAC table entry

+ 9 - 1
src/Cedar/Interop_OpenVPN.c

@@ -766,6 +766,7 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C
 {
 	LIST *o;
 	BUF *b;
+	char opt_str[MAX_SIZE];
 	// Validate arguments
 	if (s == NULL || se == NULL || c == NULL || data == NULL)
 	{
@@ -779,7 +780,14 @@ void OvsSetupSessionParameters(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_C
 
 	OvsLog(s, se, c, "LO_OPTION_STR_RECV", data->OptionString);
 
-	o = OvsParseOptions(data->OptionString);
+	Zero(opt_str, sizeof(opt_str));
+	StrCpy(opt_str, sizeof(opt_str), data->OptionString);
+	if (s->Cedar != NULL && (IsEmptyStr(opt_str) || StartWith(opt_str, "V0 UNDEF") || InStr(opt_str, ",") == false))
+	{
+		StrCpy(opt_str, sizeof(opt_str), s->Cedar->OpenVPNDefaultClientOption);
+	}
+
+	o = OvsParseOptions(opt_str);
 
 	if (se->Mode == OPENVPN_MODE_UNKNOWN)
 	{

+ 3 - 0
src/Cedar/Interop_OpenVPN.h

@@ -311,6 +311,9 @@ struct OPENVPN_SERVER_UDP
 	UINT64 VgsNextGetPublicPortsTick;
 };
 
+// OpenVPN Default Client Option String
+#define	OVPN_DEF_CLIENT_OPTION_STRING	"dev-type tun,link-mtu 1500,tun-mtu 1500,cipher AES-128-CBC,auth SHA1,keysize 128,key-method 2,tls-client"
+
 
 //// Function prototype
 OPENVPN_SERVER_UDP *NewOpenVpnServerUdp(CEDAR *cedar);

+ 1 - 1
src/Cedar/Layer3.c

@@ -1031,7 +1031,7 @@ void L3PollingBeacon(L3IF *f)
 
 		Copy(udp_buf + sizeof(IPV4_HEADER) + sizeof(UDP_HEADER), beacon_str, sizeof(beacon_str));
 
-		udp->Checksum = IpChecksum(udp, sizeof(UDP_HEADER) + sizeof(beacon_str));
+		udp->Checksum = CalcChecksumForIPv4(f->IpAddress, dest_ip, 0x11, udp, sizeof(UDP_HEADER) + sizeof(beacon_str), 0);
 
 		ip->DstIP = dest_ip;
 		IPV4_SET_VERSION(ip, 4);

+ 43 - 9
src/Cedar/Protocol.c

@@ -842,24 +842,24 @@ void GenerateMachineUniqueHash(void *data)
 {
 	BUF *b;
 	char name[64];
-	char ip_str[64];
-	IP ip;
 	OS_INFO *osinfo;
+	UINT64 iphash = 0;
 	// Validate arguments
 	if (data == NULL)
 	{
 		return;
 	}
 
+	iphash = GetHostIPAddressListHash();
+
 	b = NewBuf();
 	GetMachineName(name, sizeof(name));
-	GetMachineIp(&ip);
-	IPToStr(ip_str, sizeof(ip_str), &ip);
 
 	osinfo = GetOsInfo();
 
 	WriteBuf(b, name, StrLen(name));
-	WriteBuf(b, ip_str, StrLen(ip_str));
+
+	WriteBufInt64(b, iphash);
 
 	WriteBuf(b, &osinfo->OsType, sizeof(osinfo->OsType));
 	WriteBuf(b, osinfo->KernelName, StrLen(osinfo->KernelName));
@@ -1265,6 +1265,7 @@ bool ServerAccept(CONNECTION *c)
 	RC4_KEY_PAIR key_pair;
 	UINT authtype;
 	POLICY *policy;
+	UINT assigned_vlan_id = 0;
 	HUB *hub;
 	SESSION *s = NULL;
 	UINT64 user_expires = 0;
@@ -1330,6 +1331,8 @@ bool ServerAccept(CONNECTION *c)
 		return false;
 	}
 
+	GenerateMachineUniqueHash(unique2);
+
 	Zero(ctoken_hash_str, sizeof(ctoken_hash_str));
 
 	Zero(mschap_v2_server_response_20, sizeof(mschap_v2_server_response_20));
@@ -1623,6 +1626,8 @@ bool ServerAccept(CONNECTION *c)
 			USER *user;
 			USERGROUP *group;
 			char plain_password[MAX_PASSWORD_LEN + 1];
+			RADIUS_LOGIN_OPTION radius_login_opt;
+
 			if (hub->Halt || hub->Offline)
 			{
 				// HUB is off-line
@@ -1633,6 +1638,13 @@ bool ServerAccept(CONNECTION *c)
 				goto CLEANUP;
 			}
 
+			Zero(&radius_login_opt, sizeof(radius_login_opt));
+
+			if (hub->Option != NULL)
+			{
+				radius_login_opt.In_CheckVLanId = hub->Option->AssignVLanIdByRadiusAttribute;
+			}
+
 			// Get the various flags
 			use_encrypt = PackGetInt(p, "use_encrypt") == 0 ? false : true;
 			use_compress = PackGetInt(p, "use_compress") == 0 ? false : true;
@@ -1997,7 +2009,7 @@ bool ServerAccept(CONNECTION *c)
 
 							if (fail_ext_user_auth == false)
 							{
-								auth_ret = SamAuthUserByPlainPassword(c, hub, username, plain_password, false, mschap_v2_server_response_20);
+								auth_ret = SamAuthUserByPlainPassword(c, hub, username, plain_password, false, mschap_v2_server_response_20, &radius_login_opt);
 							}
 
 							if (auth_ret && pol == NULL)
@@ -2028,7 +2040,7 @@ bool ServerAccept(CONNECTION *c)
 								// If there is asterisk user, log on as the user
 								if (b)
 								{
-									auth_ret = SamAuthUserByPlainPassword(c, hub, username, plain_password, true, mschap_v2_server_response_20);
+									auth_ret = SamAuthUserByPlainPassword(c, hub, username, plain_password, true, mschap_v2_server_response_20, &radius_login_opt);
 									if (auth_ret && pol == NULL)
 									{
 										pol = SamGetUserPolicy(hub, "*");
@@ -2180,6 +2192,12 @@ bool ServerAccept(CONNECTION *c)
 			// Authentication success
 			FreePack(p);
 
+			// Check the assigned VLAN ID
+			if (radius_login_opt.Out_VLanId != 0)
+			{
+				assigned_vlan_id = radius_login_opt.Out_VLanId;
+			}
+
 			if (StrCmpi(username, ADMINISTRATOR_USERNAME) != 0)
 			{
 				// Get the policy
@@ -2468,8 +2486,6 @@ bool ServerAccept(CONNECTION *c)
 				policy->NoRouting = true;
 			}
 
-			GenerateMachineUniqueHash(unique2);
-
 			if (Cmp(unique, unique2, SHA1_SIZE) == 0)
 			{
 				// It's a localhost session
@@ -2865,6 +2881,18 @@ bool ServerAccept(CONNECTION *c)
 			// Remove the connection from Cedar
 			DelConnection(c->Cedar, c);
 
+			// VLAN ID
+			if (assigned_vlan_id != 0)
+			{
+				if (policy != NULL)
+				{
+					if (policy->VLanId == 0)
+					{
+						policy->VLanId = assigned_vlan_id;
+					}
+				}
+			}
+
 			// Create a Session
 			StrLower(username);
 			s = NewServerSessionEx(c->Cedar, c, hub, username, policy, c->IsInProc);
@@ -3050,6 +3078,7 @@ bool ServerAccept(CONNECTION *c)
 			s->QoS = qos;
 			s->NoReconnectToSession = no_reconnect_to_session;
 
+
 			if (policy != NULL)
 			{
 				s->VLanId = policy->VLanId;
@@ -3245,6 +3274,11 @@ bool ServerAccept(CONNECTION *c)
 			NodeInfoToStr(tmp, sizeof(tmp), &s->NodeInfo);
 
 			HLog(hub, "LH_NODE_INFO", s->Name, tmp);
+
+			if (s->VLanId != 0)
+			{
+				HLog(hub, "LH_VLAN_ID", s->Name, s->VLanId);
+			}
 		}
 
 		// Shift the connection to the tunneling mode

+ 102 - 1
src/Cedar/Radius.c

@@ -114,7 +114,8 @@
 #include "CedarPch.h"
 
 // Attempts Radius authentication (with specifying retry interval and multiple server)
-bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT secret_size, wchar_t *username, char *password, UINT interval, UCHAR *mschap_v2_server_response_20)
+bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT secret_size, wchar_t *username, char *password, UINT interval, UCHAR *mschap_v2_server_response_20,
+				 RADIUS_LOGIN_OPTION *opt)
 {
 	UCHAR random[MD5_SIZE];
 	UCHAR id;
@@ -128,6 +129,7 @@ bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT sec
 	IPC_MSCHAP_V2_AUTHINFO mschap;
 	bool is_mschap;
 	char client_ip_str[MAX_SIZE];
+	RADIUS_LOGIN_OPTION opt_dummy;
 	static UINT packet_id = 0;
 	// Validate arguments
 	if (server == NULL || port == 0 || (secret_size != 0 && secret == NULL) || username == NULL || password == NULL)
@@ -135,6 +137,15 @@ bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT sec
 		return false;
 	}
 
+	if (opt == NULL)
+	{
+		Zero(&opt_dummy, sizeof(opt_dummy));
+
+		opt = &opt_dummy;
+	}
+
+	opt->Out_VLanId = 0;
+
 	Zero(client_ip_str, sizeof(client_ip_str));
 	if (c != NULL && c->FirstSock != NULL)
 	{
@@ -450,6 +461,34 @@ RECV_RETRY:
 								FreeBuf(b);
 							}
 						}
+
+						if (opt->In_CheckVLanId)
+						{
+							BUF *buf = NewBufFromMemory(recv_buf, recv_size);
+							LIST *o = RadiusParseOptions(buf);
+
+							if (o != NULL)
+							{
+								DHCP_OPTION *vlan_option = GetDhcpOption(o, RADIUS_ATTRIBUTE_VLAN_ID);
+
+								if (vlan_option != NULL)
+								{
+									UINT vlan_id = 0;
+									char tmp[32];
+
+									Zero(tmp, sizeof(tmp));
+
+									Copy(tmp, vlan_option->Data, MIN(vlan_option->Size, sizeof(tmp) - 1));
+
+									vlan_id = ToInt(tmp);
+
+									opt->Out_VLanId = vlan_id;
+								}
+							}
+
+							FreeBuf(buf);
+							FreeDhcpOptions(o);
+						}
 					}
 					break;
 				}
@@ -484,6 +523,68 @@ RECV_RETRY:
 	return ret;
 }
 
+// Parse RADIUS attributes
+LIST *RadiusParseOptions(BUF *b)
+{
+	LIST *o;
+	UCHAR code;
+	UCHAR id;
+	USHORT len;
+	UCHAR auth[16];
+	// Validate arguments
+	if (b == NULL)
+	{
+		return NULL;
+	}
+
+	o = NewList(NULL);
+
+	ReadBuf(b, &code, 1);
+	ReadBuf(b, &id, 1);
+	len = 0;
+	ReadBuf(b, &len, 2);
+	len = Endian16(len);
+	ReadBuf(b, auth, 16);
+
+	while (true)
+	{
+		UCHAR attribute_id;
+		UCHAR size;
+		UCHAR data[256];
+		DHCP_OPTION *d;
+
+		if (ReadBuf(b, &attribute_id, 1) != 1)
+		{
+			break;
+		}
+
+		if (ReadBuf(b, &size, 1) != 1)
+		{
+			break;
+		}
+
+		if (size <= 2)
+		{
+			break;
+		}
+
+		size -= 2;
+		if (ReadBuf(b, data, size) != size)
+		{
+			break;
+		}
+
+		d = ZeroMalloc(sizeof(DHCP_OPTION));
+		d->Id = attribute_id;
+		d->Size = size;
+		d->Data = Clone(data, d->Size);
+
+		Add(o, d);
+	}
+
+	return o;
+}
+
 // Adding Attributes
 void RadiusAddValue(BUF *b, UCHAR t, UINT v, UCHAR vt, void *data, UINT size)
 {

+ 13 - 1
src/Cedar/Radius.h

@@ -118,13 +118,25 @@
 #define	RADIUS_RETRY_INTERVAL	500				// Retransmission interval
 #define	RADIUS_RETRY_TIMEOUT	(10 * 1000)		// Time-out period
 
+
+// RADIUS attributes
+#define	RADIUS_ATTRIBUTE_VLAN_ID	81
+
+struct RADIUS_LOGIN_OPTION
+{
+	bool In_CheckVLanId;
+	UINT Out_VLanId;
+};
+
 // Function prototype
-bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT secret_size, wchar_t *username, char *password, UINT interval, UCHAR *mschap_v2_server_response_20);
+bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT secret_size, wchar_t *username, char *password, UINT interval, UCHAR *mschap_v2_server_response_20,
+				 RADIUS_LOGIN_OPTION *opt);
 BUF *RadiusEncryptPassword(char *password, UCHAR *random, UCHAR *secret, UINT secret_size);
 BUF *RadiusCreateUserName(wchar_t *username);
 BUF *RadiusCreateUserPassword(void *data, UINT size);
 BUF *RadiusCreateNasId(char *name);
 void RadiusAddValue(BUF *b, UCHAR t, UINT v, UCHAR vt, void *data, UINT size);
+LIST *RadiusParseOptions(BUF *b);
 
 #endif	// RADIUS_H
 

+ 1 - 1
src/Cedar/SW.c

@@ -2670,7 +2670,7 @@ void SwDefineTasks(SW *sw, SW_TASK *t, SW_COMPONENT *c)
 		SW_TASK_COPY *vpninstall;
 		wchar_t *src_config_filename;
 
-		CombinePathW(tmp, sizeof(tmp), sw->InstallDir, L"backup.vpn_vpnclient.config");
+		CombinePathW(tmp, sizeof(tmp), sw->InstallDir, L"backup.vpn_client.config");
 		Add(t->SetSecurityPaths, CopyUniStr(tmp));
 
 		if (x64 == false)

+ 2 - 2
src/Cedar/Sam.c

@@ -175,7 +175,7 @@ bool SamAuthUserByAnonymous(HUB *h, char *username)
 }
 
 // Plaintext password authentication of user
-bool SamAuthUserByPlainPassword(CONNECTION *c, HUB *hub, char *username, char *password, bool ast, UCHAR *mschap_v2_server_response_20)
+bool SamAuthUserByPlainPassword(CONNECTION *c, HUB *hub, char *username, char *password, bool ast, UCHAR *mschap_v2_server_response_20, RADIUS_LOGIN_OPTION *opt)
 {
 	bool b = false;
 	wchar_t *name = NULL;
@@ -267,7 +267,7 @@ bool SamAuthUserByPlainPassword(CONNECTION *c, HUB *hub, char *username, char *p
 					// Attempt to login
 					b = RadiusLogin(c, radius_server_addr, radius_server_port,
 						radius_secret, StrLen(radius_secret),
-						name, password, interval, mschap_v2_server_response_20);
+						name, password, interval, mschap_v2_server_response_20, opt);
 				}
 
 				Lock(hub->lock);

+ 1 - 1
src/Cedar/Sam.h

@@ -121,7 +121,7 @@ UINT SamGetUserAuthType(HUB *h, char *username);
 bool SamAuthUserByPassword(HUB *h, char *username, void *random, void *secure_password, char *mschap_v2_password, UCHAR *mschap_v2_server_response_20, UINT *err);
 bool SamAuthUserByAnonymous(HUB *h, char *username);
 bool SamAuthUserByCert(HUB *h, char *username, X *x);
-bool SamAuthUserByPlainPassword(CONNECTION *c, HUB *hub, char *username, char *password, bool ast, UCHAR *mschap_v2_server_response_20);
+bool SamAuthUserByPlainPassword(CONNECTION *c, HUB *hub, char *username, char *password, bool ast, UCHAR *mschap_v2_server_response_20, RADIUS_LOGIN_OPTION *opt);
 POLICY *SamGetUserPolicy(HUB *h, char *username);
 
 void GenRamdom(void *random);

+ 51 - 0
src/Cedar/Server.c

@@ -260,6 +260,7 @@ UINT SiDebug(SERVER *s, RPC_TEST *ret, UINT i, char *str)
 		{10, "Get VgsMessageDisplayed Flag", "", SiDebugProcGetVgsMessageDisplayedValue},
 		{11, "Set VgsMessageDisplayed Flag", "", SiDebugProcSetVgsMessageDisplayedValue},
 		{12, "Get the current TCP send queue length", "", SiDebugProcGetCurrentTcpSendQueueLength},
+		{13, "Get the current GetIP thread count", "", SiDebugProcGetCurrentGetIPThreadCount},
 	};
 	UINT num_proc_list = sizeof(proc_list) / sizeof(proc_list[0]);
 	UINT j;
@@ -478,6 +479,25 @@ UINT SiDebugProcGetCurrentTcpSendQueueLength(SERVER *s, char *in_str, char *ret_
 
 	return ERR_NO_ERROR;
 }
+UINT SiDebugProcGetCurrentGetIPThreadCount(SERVER *s, char *in_str, char *ret_str, UINT ret_str_size)
+{
+	char tmp1[64], tmp2[64];
+	// Validate arguments
+	if (s == NULL || in_str == NULL || ret_str == NULL)
+	{
+		return ERR_INVALID_PARAMETER;
+	}
+
+	ToStr3(tmp1, 0, GetCurrentGetIpThreadNum());
+	ToStr3(tmp2, 0, GetGetIpThreadMaxNum());
+
+	Format(ret_str, 0, 
+		"Current threads = %s\n"
+		"Quota           = %s\n",
+		tmp1, tmp2);
+
+	return ERR_NO_ERROR;
+}
 UINT SiDebugProcSetVgsMessageDisplayedValue(SERVER *s, char *in_str, char *ret_str, UINT ret_str_size)
 {
 	// Validate arguments
@@ -4081,6 +4101,7 @@ void SiLoadHubOptionCfg(FOLDER *f, HUB_OPTION *o)
 	o->DisableCheckMacOnLocalBridge = CfgGetBool(f, "DisableCheckMacOnLocalBridge");
 	o->DisableCorrectIpOffloadChecksum = CfgGetBool(f, "DisableCorrectIpOffloadChecksum");
 	o->SuppressClientUpdateNotification = CfgGetBool(f, "SuppressClientUpdateNotification");
+	o->AssignVLanIdByRadiusAttribute = CfgGetBool(f, "AssignVLanIdByRadiusAttribute");
 
 	// Enabled by default
 	if (CfgIsItem(f, "ManageOnlyPrivateIP"))
@@ -4156,6 +4177,7 @@ void SiWriteHubOptionCfg(FOLDER *f, HUB_OPTION *o)
 	CfgAddBool(f, "DropBroadcastsInPrivacyFilterMode", o->DropBroadcastsInPrivacyFilterMode);
 	CfgAddBool(f, "DropArpInPrivacyFilterMode", o->DropArpInPrivacyFilterMode);
 	CfgAddBool(f, "SuppressClientUpdateNotification", o->SuppressClientUpdateNotification);
+	CfgAddBool(f, "AssignVLanIdByRadiusAttribute", o->AssignVLanIdByRadiusAttribute);
 	CfgAddBool(f, "NoLookBPDUBridgeId", o->NoLookBPDUBridgeId);
 	CfgAddInt(f, "AdjustTcpMssValue", o->AdjustTcpMssValue);
 	CfgAddBool(f, "DisableAdjustTcpMss", o->DisableAdjustTcpMss);
@@ -5748,6 +5770,7 @@ void SiLoadServerCfg(SERVER *s, FOLDER *f)
 	bool cluster_allowed = false;
 	UINT num_connections_per_ip = 0;
 	FOLDER *params_folder;
+	UINT i;
 	// Validate arguments
 	if (s == NULL || f == NULL)
 	{
@@ -5765,6 +5788,16 @@ void SiLoadServerCfg(SERVER *s, FOLDER *f)
 		s->AutoSaveConfigSpan = MAKESURE(s->AutoSaveConfigSpan, SERVER_FILE_SAVE_INTERVAL_MIN, SERVER_FILE_SAVE_INTERVAL_MAX);
 	}
 
+	i = CfgGetInt(f, "MaxConcurrentDnsClientThreads");
+	if (i != 0)
+	{
+		SetGetIpThreadMaxNum(i);
+	}
+	else
+	{
+		SetGetIpThreadMaxNum(DEFAULT_GETIP_THREAD_MAX_NUM);
+	}
+
 	s->DontBackupConfig = CfgGetBool(f, "DontBackupConfig");
 
 	if (CfgIsItem(f, "BackupConfigOnlyWhenModified"))
@@ -5900,6 +5933,16 @@ void SiLoadServerCfg(SERVER *s, FOLDER *f)
 		// Disable the OpenVPN server function
 		s->DisableOpenVPNServer = CfgGetBool(f, "DisableOpenVPNServer");
 
+		// OpenVPN Default Option String
+		if (CfgGetStr(f, "OpenVPNDefaultClientOption", tmp, sizeof(tmp)))
+		{
+			if (IsEmptyStr(tmp) == false)
+			{
+				StrCpy(c->OpenVPNDefaultClientOption,
+					sizeof(c->OpenVPNDefaultClientOption), tmp);
+			}
+		}
+
 		// Disable the NAT-traversal feature
 		s->DisableNatTraversal = CfgGetBool(f, "DisableNatTraversal");
 
@@ -6190,6 +6233,8 @@ void SiWriteServerCfg(FOLDER *f, SERVER *s)
 		return;
 	}
 
+	CfgAddInt(f, "MaxConcurrentDnsClientThreads", GetGetIpThreadMaxNum());
+
 	CfgAddInt(f, "CurrentBuild", s->Cedar->Build);
 
 	CfgAddInt(f, "AutoSaveConfigSpan", s->AutoSaveConfigSpanSaved / 1000);
@@ -6292,6 +6337,8 @@ void SiWriteServerCfg(FOLDER *f, SERVER *s)
 			}
 		}
 
+		CfgAddStr(f, "OpenVPNDefaultClientOption", c->OpenVPNDefaultClientOption);
+
 		if (c->Bridge == false)
 		{
 			// VPN over ICMP
@@ -7431,6 +7478,7 @@ void SiCalledUpdateHub(SERVER *s, PACK *p)
 	o.DropBroadcastsInPrivacyFilterMode = PackGetBool(p, "DropBroadcastsInPrivacyFilterMode");
 	o.DropArpInPrivacyFilterMode = PackGetBool(p, "DropArpInPrivacyFilterMode");
 	o.SuppressClientUpdateNotification = PackGetBool(p, "SuppressClientUpdateNotification");
+	o.AssignVLanIdByRadiusAttribute = PackGetBool(p, "AssignVLanIdByRadiusAttribute");
 	o.VlanTypeId = PackGetInt(p, "VlanTypeId");
 	if (o.VlanTypeId == 0)
 	{
@@ -9270,6 +9318,7 @@ void SiPackAddCreateHub(PACK *p, HUB *h)
 	PackAddBool(p, "DropBroadcastsInPrivacyFilterMode", h->Option->DropBroadcastsInPrivacyFilterMode);
 	PackAddBool(p, "DropArpInPrivacyFilterMode", h->Option->DropArpInPrivacyFilterMode);
 	PackAddBool(p, "SuppressClientUpdateNotification", h->Option->SuppressClientUpdateNotification);
+	PackAddBool(p, "AssignVLanIdByRadiusAttribute", h->Option->AssignVLanIdByRadiusAttribute);
 	PackAddInt(p, "ClientMinimumRequiredBuild", h->Option->ClientMinimumRequiredBuild);
 	PackAddBool(p, "FixForDLinkBPDU", h->Option->FixForDLinkBPDU);
 	PackAddBool(p, "BroadcastLimiterStrictMode", h->Option->BroadcastLimiterStrictMode);
@@ -10811,6 +10860,8 @@ SERVER *SiNewServerEx(bool bridge, bool in_client_inner_server)
 	LISTENER *azure;
 	LISTENER *rudp;
 
+	SetGetIpThreadMaxNum(DEFAULT_GETIP_THREAD_MAX_NUM);
+
 	s = ZeroMalloc(sizeof(SERVER));
 
 	SetEraserCheckInterval(0);

+ 1 - 0
src/Cedar/Server.h

@@ -678,6 +678,7 @@ UINT SiDebugProcSetIPsecMessageDisplayedValue(SERVER *s, char *in_str, char *ret
 UINT SiDebugProcGetVgsMessageDisplayedValue(SERVER *s, char *in_str, char *ret_str, UINT ret_str_size);
 UINT SiDebugProcSetVgsMessageDisplayedValue(SERVER *s, char *in_str, char *ret_str, UINT ret_str_size);
 UINT SiDebugProcGetCurrentTcpSendQueueLength(SERVER *s, char *in_str, char *ret_str, UINT ret_str_size);
+UINT SiDebugProcGetCurrentGetIPThreadCount(SERVER *s, char *in_str, char *ret_str, UINT ret_str_size);
 
 typedef UINT (SI_DEBUG_PROC)(SERVER *s, char *in_str, char *ret_str, UINT ret_str_size);
 

+ 19 - 2
src/Cedar/UdpAccel.c

@@ -1034,6 +1034,11 @@ UDP_ACCEL *NewUdpAccel(CEDAR *cedar, IP *ip, bool client_mode, bool random_port,
 
 	a->IsIPv6 = IsIP6(ip);
 
+	if (a->IsIPv6)
+	{
+		a->NoNatT = true;
+	}
+
 	a->RecvBlockQueue = NewQueue();
 
 	Rand(a->NextIv, sizeof(a->NextIv));
@@ -1088,6 +1093,8 @@ void NatT_GetIpThread(THREAD *thread, void *param)
 {
 	UDP_ACCEL *a;
 	char hostname[MAX_SIZE];
+	static IP dummy_ip = {0};
+	UINT num_retry = 0;
 	// Validate arguments
 	if (thread == NULL || param == NULL)
 	{
@@ -1096,11 +1103,17 @@ void NatT_GetIpThread(THREAD *thread, void *param)
 
 	a = (UDP_ACCEL *)param;
 
-	RUDPGetRegisterHostNameByIP(hostname, sizeof(hostname), NULL);
+	if (IsZeroIP(&dummy_ip))
+	{
+		SetIP(&dummy_ip, 11, Rand8(), Rand8(), Rand8());
+	}
+
+	RUDPGetRegisterHostNameByIP(hostname, sizeof(hostname), &dummy_ip);
 
 	while (a->NatT_Halt == false)
 	{
 		IP ip;
+		UINT wait_time = UDP_NAT_T_GET_IP_INTERVAL;
 
 		// Get the IP address
 		bool ret = GetIP4Ex(&ip, hostname, 0, &a->NatT_Halt);
@@ -1125,7 +1138,11 @@ void NatT_GetIpThread(THREAD *thread, void *param)
 		}
 
 		// Fail to get
-		Wait(a->NatT_HaltEvent, UDP_NAT_T_GET_IP_INTERVAL);
+		num_retry++;
+
+		wait_time = (UINT)(MIN((UINT64)UDP_NAT_T_GET_IP_INTERVAL * (UINT64)num_retry, (UINT64)UDP_NAT_T_GET_IP_INTERVAL_MAX));
+
+		Wait(a->NatT_HaltEvent, wait_time);
 	}
 }
 

+ 3 - 3
src/CurrentBuild.txt

@@ -1,4 +1,4 @@
-BUILD_NUMBER 9506
-VERSION 411
+BUILD_NUMBER 9514
+VERSION 412
 BUILD_NAME beta
-BUILD_DATE 20141022_195155
+BUILD_DATE 20141117_214116

File diff suppressed because it is too large
+ 24 - 0
src/Makefile64


+ 269 - 1
src/Mayaqua/Network.c

@@ -229,6 +229,8 @@ static LOCK *host_ip_address_list_cache_lock = NULL;
 static UINT64 host_ip_address_list_cache_last = 0;
 static LIST *host_ip_address_cache = NULL;
 static bool disable_gethostname_by_accept = false;
+static COUNTER *getip_thread_counter = NULL;
+static UINT max_getip_thread = 0;
 
 
 static char *cipher_list = "RC4-MD5 RC4-SHA AES128-SHA AES256-SHA DES-CBC-SHA DES-CBC3-SHA DHE-RSA-AES128-SHA DHE-RSA-AES256-SHA";
@@ -2005,6 +2007,17 @@ bool RUDPIsIpInValidateList(RUDP_STACK *r, IP *ip)
 		return false;
 	}
 
+	// Always allow private IP addresses
+	if (IsIPPrivate(ip))
+	{
+		return true;
+	}
+
+	if (IsIPAddressInSameLocalNetwork(ip))
+	{
+		return true;
+	}
+
 	for (i = 0;i < LIST_NUM(r->NatT_SourceIpList);i++)
 	{
 		RUDP_SOURCE_IP *s = (RUDP_SOURCE_IP *)LIST_DATA(r->NatT_SourceIpList, i);
@@ -4350,6 +4363,7 @@ void RUDPIpQueryThread(THREAD *thread, void *param)
 	void *route_change_poller = NULL;
 	char current_hostname[MAX_SIZE];
 	bool last_time_ip_changed = false;
+	UINT num_retry = 0;
 	// Validate arguments
 	if (thread == NULL || param == NULL)
 	{
@@ -4429,7 +4443,9 @@ void RUDPIpQueryThread(THREAD *thread, void *param)
 
 			if (IsZeroIp(&r->NatT_IP))
 			{
-				next_getip_tick = now + (UINT64)UDP_NAT_T_GET_IP_INTERVAL;
+				num_retry++;
+
+				next_getip_tick = now + MIN((UINT64)UDP_NAT_T_GET_IP_INTERVAL * (UINT64)num_retry, (UINT64)UDP_NAT_T_GET_IP_INTERVAL_MAX);
 			}
 			else
 			{
@@ -6730,6 +6746,46 @@ bool IsInSameNetwork4(IP *a1, IP *a2, IP *subnet)
 
 	return false;
 }
+bool IsInSameNetwork4Standard(IP *a1, IP *a2)
+{
+	IP subnet;
+
+	SetIP(&subnet, 255, 255, 0, 0);
+
+	return IsInSameNetwork4(a1, a2, &subnet);
+}
+bool IsInSameLocalNetworkToMe4(IP *a)
+{
+	IP g1, g2;
+
+	Zero(&g1, sizeof(g1));
+	Zero(&g2, sizeof(g2));
+
+	GetCurrentGlobalIPGuess(&g1, false);
+
+	if (IsZeroIp(&g1) == false)
+	{
+		if (IsInSameNetwork4Standard(&g1, a))
+		{
+			return true;
+		}
+	}
+
+	if (GetCurrentGlobalIP(&g2, false))
+	{
+		if (IsInSameNetwork4Standard(&g2, a))
+		{
+			return true;
+		}
+	}
+
+	if (IsIPAddressInSameLocalNetwork(a))
+	{
+		return true;
+	}
+
+	return false;
+}
 
 // Check whether it is a network address prefix
 bool IsNetworkAddress6(IP *ip, IP *subnet)
@@ -10926,6 +10982,20 @@ void InitHostCache()
 	HostCacheList = NewList(CompareHostCache);
 }
 
+// Get the number of wait threads
+UINT GetNumWaitThread()
+{
+	UINT ret = 0;
+
+	LockList(WaitThreadList);
+	{
+		ret = LIST_NUM(WaitThreadList);
+	}
+	UnlockList(WaitThreadList);
+
+	return ret;
+}
+
 // Add the thread to the thread waiting list
 void AddWaitThread(THREAD *t)
 {
@@ -16631,6 +16701,8 @@ void GetIP4Ex6ExThread(THREAD *t, void *param)
 	ReleaseGetIPThreadParam(p);
 
 	DelWaitThread(t);
+
+	Dec(getip_thread_counter);
 }
 
 // Perform a forward DNS query (with timeout)
@@ -16645,9 +16717,13 @@ bool GetIP4Ex6Ex2(IP *ip, char *hostname_arg, UINT timeout, bool ipv6, bool *can
 	bool ret = false;
 	UINT64 start_tick = 0;
 	UINT64 end_tick = 0;
+	UINT64 spent_time = 0;
+	UINT64 now;
+	UINT n;
 	bool use_dns_proxy = false;
 	char hostname[260];
 	UINT i;
+	bool timed_out;
 	// Validate arguments
 	if (ip == NULL || hostname_arg == NULL)
 	{
@@ -16718,6 +16794,89 @@ bool GetIP4Ex6Ex2(IP *ip, char *hostname_arg, UINT timeout, bool ipv6, bool *can
 	}
 
 
+	// check the quota
+	start_tick = Tick64();
+	end_tick = start_tick + (UINT64)timeout;
+
+	n = 0;
+
+	timed_out = false;
+
+	while (true)
+	{
+		UINT64 now = Tick64();
+		UINT64 remain;
+		UINT remain32;
+
+		if (GetGetIpThreadMaxNum() > GetCurrentGetIpThreadNum())
+		{
+			// below the quota
+			break;
+		}
+
+		if (now >= end_tick)
+		{
+			// timeouted
+			timed_out = true;
+			break;
+		}
+
+		if (cancel != NULL && (*cancel))
+		{
+			// cancelled
+			timed_out = true;
+			break;
+		}
+
+		remain = end_tick - now;
+		remain32 = MIN((UINT)remain, 100);
+
+		SleepThread(remain32);
+		n++;
+	}
+
+	now = Tick64();
+	spent_time = now - start_tick;
+
+	if (n == 0)
+	{
+		spent_time = 0;
+	}
+
+	if ((UINT)spent_time >= timeout)
+	{
+		timed_out = true;
+	}
+
+	if (timed_out)
+	{
+		IP ip2;
+
+		// timed out, cancelled
+		if (QueryDnsCache(&ip2, hostname))
+		{
+			ret = true;
+
+			Copy(ip, &ip2, sizeof(IP));
+		}
+
+		Debug("GetIP4Ex6Ex2: Worker thread quota exceeded: max=%u current=%u\n",
+			GetGetIpThreadMaxNum(), GetCurrentGetIpThreadNum());
+
+		return ret;
+	}
+
+	// Increment the counter
+	Inc(getip_thread_counter);
+
+	if (spent_time != 0)
+	{
+		Debug("GetIP4Ex6Ex2: Waited for %u msecs to create a worker thread.\n",
+			spent_time);
+	}
+
+	timeout -= (UINT)spent_time;
+
 	p = ZeroMalloc(sizeof(GETIP_THREAD_PARAM));
 	p->Ref = NewRef();
 	StrCpy(p->HostName, sizeof(p->HostName), hostname);
@@ -16774,6 +16933,7 @@ bool GetIP4Ex6Ex2(IP *ip, char *hostname_arg, UINT timeout, bool ipv6, bool *can
 	{
 		IP ip2;
 
+#if	0
 		if (only_direct_dns == false)
 		{
 			if (ipv6)
@@ -16802,6 +16962,7 @@ bool GetIP4Ex6Ex2(IP *ip, char *hostname_arg, UINT timeout, bool ipv6, bool *can
 				}
 			}
 		}
+#endif
 
 		if (QueryDnsCache(&ip2, hostname))
 		{
@@ -17457,6 +17618,27 @@ void FreeSSLCtx(struct ssl_ctx_st *ctx)
 	SSL_CTX_free(ctx);
 }
 
+// The number of get ip threads
+void SetGetIpThreadMaxNum(UINT num)
+{
+	max_getip_thread = num;
+}
+UINT GetGetIpThreadMaxNum()
+{
+	UINT ret = max_getip_thread;
+
+	if (ret == 0)
+	{
+		ret = 0x7FFFFFFF;
+	}
+
+	return ret;
+}
+UINT GetCurrentGetIpThreadNum()
+{
+	return Count(getip_thread_counter);
+}
+
 // Initialize the network communication module
 void InitNetwork()
 {
@@ -17471,6 +17653,8 @@ void InitNetwork()
 
 	num_tcp_connections = NewCounter();
 
+	getip_thread_counter = NewCounter();
+
 	// Initialization of client list
 	InitIpClientList();
 
@@ -17515,6 +17699,8 @@ void InitNetwork()
 	dh_1024 = DhNewGroup2();
 
 	Zero(rand_port_numbers, sizeof(rand_port_numbers));
+
+	SetGetIpThreadMaxNum(DEFAULT_GETIP_THREAD_MAX_NUM);
 }
 
 // Enable the network name cache
@@ -17770,6 +17956,45 @@ void FreePrivateIPFile()
 	g_use_privateip_file = false;
 }
 
+// Check whether the specified IP address is in the same network to this computer
+bool IsIPAddressInSameLocalNetwork(IP *a)
+{
+	bool ret = false;
+	LIST *o;
+	UINT i;
+	// Validate arguments
+	if (a == NULL)
+	{
+		return false;
+	}
+
+	o = GetHostIPAddressList();
+
+	if (o != NULL)
+	{
+		for (i = 0;i < LIST_NUM(o);i++)
+		{
+			IP *p = LIST_DATA(o, i);
+
+			if (IsIP4(p))
+			{
+				if (IsZeroIp(p) == false && p->addr[0] != 127)
+				{
+					if (IsInSameNetwork4Standard(p, a))
+					{
+						ret = true;
+						break;
+					}
+				}
+			}
+		}
+
+		FreeHostIPAddressList(o);
+	}
+
+	return ret;
+}
+
 // Guess the IPv4, IPv6 global address from the IP address list of the current interface
 void GetCurrentGlobalIPGuess(IP *ip, bool ipv6)
 {
@@ -17950,6 +18175,9 @@ void FreeNetwork()
 
 	FreeDynList();
 
+	DeleteCounter(getip_thread_counter);
+	getip_thread_counter = NULL;
+
 }
 
 // Add a socket to socket list
@@ -19114,6 +19342,46 @@ int CmpIpAddressList(void *p1, void *p2)
 	return r;
 }
 
+// Get the IP address list hash of the host
+UINT64 GetHostIPAddressListHash()
+{
+	UINT i;
+	LIST *o;
+	BUF *buf = NewBuf();
+	UCHAR hash[SHA1_SIZE];
+	UINT64 ret = 0;
+
+	o = GetHostIPAddressList();
+
+	if (o != NULL)
+	{
+		for (i = 0;i < LIST_NUM(o);i++)
+		{
+			IP *ip = LIST_DATA(o, i);
+			char tmp[128];
+
+			Zero(tmp, sizeof(tmp));
+			IPToStr(tmp, sizeof(tmp), ip);
+
+			WriteBufStr(buf, tmp);
+		}
+
+		FreeHostIPAddressList(o);
+	}
+
+	WriteBufStr(buf, "test");
+
+	HashSha1(hash, buf->Buf, buf->Size);
+
+	FreeBuf(buf);
+
+	Copy(&ret, hash, sizeof(UINT64));
+
+	ret = Endian64(ret);
+
+	return ret;
+}
+
 // Get the IP address list of the host (using cache)
 LIST *GetHostIPAddressList()
 {

+ 18 - 0
src/Mayaqua/Network.h

@@ -147,6 +147,13 @@ struct DYN_VALUE
 
 #define	MAX_NUM_IGNORE_ERRORS		1024
 
+#ifndef	USE_STRATEGY_LOW_MEMORY
+#define	DEFAULT_GETIP_THREAD_MAX_NUM		512
+#else	// USE_STRATEGY_LOW_MEMORY
+#define	DEFAULT_GETIP_THREAD_MAX_NUM		64
+#endif	// USE_STRATEGY_LOW_MEMORY
+
+
 // SSL logging function
 //#define	ENABLE_SSL_LOGGING
 #define	SSL_LOGGING_DIRNAME			"@ssl_log"
@@ -748,6 +755,7 @@ struct RUDP_SESSION
 
 // Related to processing to get the IP address of the NAT-T server
 #define	UDP_NAT_T_GET_IP_INTERVAL			DYN32(UDP_NAT_T_GET_IP_INTERVAL, (5 * 1000))		// IP address acquisition interval of NAT-T server (before success)
+#define	UDP_NAT_T_GET_IP_INTERVAL_MAX		DYN32(UDP_NAT_T_GET_IP_INTERVAL, (150 * 1000))		// IP address acquisition interval of NAT-T server (before success)
 #define	UDP_NAT_T_GET_IP_INTERVAL_AFTER		DYN32(UDP_NAT_T_GET_IP_INTERVAL_AFTER, (5 * 60 * 1000))	// IP address acquisition interval of NAT-T server (after success)
 
 // Related to process to get the private IP address of itself with making a TCP connection to the NAT-T server
@@ -1418,6 +1426,7 @@ void RouteToStr(char *str, UINT str_size, ROUTE_ENTRY *e);
 void DebugPrintRoute(ROUTE_ENTRY *e);
 void DebugPrintRouteTable(ROUTE_TABLE *r);
 bool IsIPv6LocalNetworkAddress(IP *ip);
+UINT GetNumWaitThread();
 
 #ifdef	ENABLE_SSL_LOGGING
 void SockEnableSslLogging(SOCK *s);
@@ -1484,6 +1493,8 @@ void IPNot4(IP *dst, IP *a);
 void IPOr4(IP *dst, IP *a, IP *b);
 void IPAnd4(IP *dst, IP *a, IP *b);
 bool IsInSameNetwork4(IP *a1, IP *a2, IP *subnet);
+bool IsInSameNetwork4Standard(IP *a1, IP *a2);
+bool IsInSameLocalNetworkToMe4(IP *a);
 
 bool ParseIpAndSubnetMask4(char *src, UINT *ip, UINT *mask);
 bool ParseIpAndSubnetMask6(char *src, IP *ip, IP *mask);
@@ -1539,6 +1550,7 @@ bool IsMyIPAddress(IP *ip);
 void FreeHostIPAddressList(LIST *o);
 void AddHostIPAddressToList(LIST *o, IP *ip);
 int CmpIpAddressList(void *p1, void *p2);
+UINT64 GetHostIPAddressListHash();
 
 UDPLISTENER *NewUdpListener(UDPLISTENER_RECV_PROC *recv_proc, void *param);
 void UdpListenerThread(THREAD *thread, void *param);
@@ -1599,6 +1611,7 @@ bool SslBioSync(SSL_BIO *b, bool sync_send, bool sync_recv);
 void SetCurrentGlobalIP(IP *ip, bool ipv6);
 bool GetCurrentGlobalIP(IP *ip, bool ipv6);
 void GetCurrentGlobalIPGuess(IP *ip, bool ipv6);
+bool IsIPAddressInSameLocalNetwork(IP *a);
 
 bool IsIPPrivate(IP *ip);
 bool IsIPMyHost(IP *ip);
@@ -1631,6 +1644,11 @@ QUERYIPTHREAD *NewQueryIpThread(char *hostname, UINT interval_last_ok, UINT inte
 bool GetQueryIpThreadResult(QUERYIPTHREAD *t, IP *ip);
 void FreeQueryIpThread(QUERYIPTHREAD *t);
 
+void SetGetIpThreadMaxNum(UINT num);
+UINT GetGetIpThreadMaxNum();
+UINT GetCurrentGetIpThreadNum();
+
+
 
 bool IsIpInStrList(IP *ip, char *ip_list);
 bool IsInStrByStrList(char *str, char *str_list);

+ 77 - 29
src/Mayaqua/TcpIp.c

@@ -3304,11 +3304,44 @@ BUF *BuildDhcpOptionsBuf(LIST *o)
 	for (i = 0;i < LIST_NUM(o);i++)
 	{
 		DHCP_OPTION *d = LIST_DATA(o, i);
+		UINT current_size = d->Size;
+		UINT current_pos = 0;
+
 		id = (UCHAR)d->Id;
-		sz = (UCHAR)d->Size;
+		if (d->Size <= 255)
+		{
+			sz = (UCHAR)d->Size;
+		}
+		else
+		{
+			sz = 0xFF;
+		}
 		WriteBuf(b, &id, 1);
 		WriteBuf(b, &sz, 1);
-		WriteBuf(b, d->Data, d->Size);
+		WriteBuf(b, d->Data, sz);
+
+		current_size -= sz;
+		current_pos += sz;
+
+		while (current_size != 0)
+		{
+			id = DHCP_ID_PRIVATE;
+			if (current_size <= 255)
+			{
+				sz = (UCHAR)current_size;
+			}
+			else
+			{
+				sz = 0xFF;
+			}
+			WriteBuf(b, &id, 1);
+			WriteBuf(b, &sz, 1);
+			WriteBuf(b, ((UCHAR *)d->Data) + current_pos, sz);
+
+			current_size -= sz;
+			current_pos += sz;
+		}
+
 	}
 
 	id = 0xff;
@@ -3755,27 +3788,24 @@ BUF *DhcpBuildClasslessRouteData(DHCP_CLASSLESS_ROUTE_TABLE *t)
 
 		if (r->Exists && r->SubnetMaskLen <= 32)
 		{
-			if (b->Size <= (255 - 9))
-			{
-				UCHAR c;
-				UINT data_len;
-				UINT ip32;
-				UCHAR tmp[4];
-
-				// Width of subnet mask
-				c = (UCHAR)r->SubnetMaskLen;
-				WriteBuf(b, &c, 1);
-
-				// Number of significant octets
-				data_len = (r->SubnetMaskLen + 7) / 8;
-				Zero(tmp, sizeof(tmp));
-				Copy(tmp, &r->Network, data_len);
-				WriteBuf(b, tmp, data_len);
-
-				// Gateway
-				ip32 = IPToUINT(&r->Gateway);
-				WriteBuf(b, &ip32, sizeof(UINT));
-			}
+			UCHAR c;
+			UINT data_len;
+			UINT ip32;
+			UCHAR tmp[4];
+
+			// Width of subnet mask
+			c = (UCHAR)r->SubnetMaskLen;
+			WriteBuf(b, &c, 1);
+
+			// Number of significant octets
+			data_len = (r->SubnetMaskLen + 7) / 8;
+			Zero(tmp, sizeof(tmp));
+			Copy(tmp, &r->Network, data_len);
+			WriteBuf(b, tmp, data_len);
+
+			// Gateway
+			ip32 = IPToUINT(&r->Gateway);
+			WriteBuf(b, &ip32, sizeof(UINT));
 		}
 	}
 
@@ -3965,6 +3995,7 @@ LIST *ParseDhcpOptions(void *data, UINT size)
 {
 	BUF *b;
 	LIST *o;
+	DHCP_OPTION *last_opt;
 	// Validate arguments
 	if (data == NULL)
 	{
@@ -3977,6 +4008,8 @@ LIST *ParseDhcpOptions(void *data, UINT size)
 
 	o = NewListFast(NULL);
 
+	last_opt = NULL;
+
 	while (true)
 	{
 		UCHAR c = 0;
@@ -3995,12 +4028,27 @@ LIST *ParseDhcpOptions(void *data, UINT size)
 			break;
 		}
 
-		opt = ZeroMalloc(sizeof(DHCP_OPTION));
-		opt->Id = (UINT)c;
-		opt->Size = (UINT)sz;
-		opt->Data = ZeroMalloc((UINT)sz);
-		ReadBuf(b, opt->Data, sz);
-		Add(o, opt);
+		if (c == DHCP_ID_PRIVATE && last_opt != NULL)
+		{
+			UINT new_size = last_opt->Size + (UINT)sz;
+			UCHAR *new_buf = ZeroMalloc(new_size);
+			Copy(new_buf, last_opt->Data, last_opt->Size);
+			ReadBuf(b, new_buf + last_opt->Size, sz);
+			Free(last_opt->Data);
+			last_opt->Data = new_buf;
+			last_opt->Size = new_size;
+		}
+		else
+		{
+			opt = ZeroMalloc(sizeof(DHCP_OPTION));
+			opt->Id = (UINT)c;
+			opt->Size = (UINT)sz;
+			opt->Data = ZeroMalloc((UINT)sz);
+			ReadBuf(b, opt->Data, sz);
+			Add(o, opt);
+
+			last_opt = opt;
+		}
 	}
 
 	FreeBuf(b);

+ 1 - 0
src/Mayaqua/TcpIp.h

@@ -625,6 +625,7 @@ struct ICMPV6_HEADER_INFO
 #define	DHCP_ID_REQ_PARAM_LIST		0x37
 #define	DHCP_ID_CLASSLESS_ROUTE		0x79
 #define	DHCP_ID_MS_CLASSLESS_ROUTE	0xF9
+#define	DHCP_ID_PRIVATE				0xFA
 
 
 // DHCP client action

BIN
src/bin/hamcore/SeLow_x64.sys


BIN
src/bin/hamcore/SeLow_x86.sys


+ 2 - 2
src/bin/hamcore/inf/selow_x64/SeLow_x64.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= NetTrans
 ClassGUID					= {4D36E975-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_selow.cat
 
@@ -66,5 +66,5 @@ SeLow_Description			= "A lightweight helper kernel-mode module for PacketiX VPN
 
 
 
-; Auto Generated 20141022_203021.056
+; Auto Generated 20141117_222152.555
 

BIN
src/bin/hamcore/inf/selow_x64/inf.cat


+ 2 - 2
src/bin/hamcore/inf/selow_x86/SeLow_x86.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= NetTrans
 ClassGUID					= {4D36E975-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_selow.cat
 
@@ -66,5 +66,5 @@ SeLow_Description			= "A lightweight helper kernel-mode module for PacketiX VPN
 
 
 
-; Auto Generated 20141022_202525.677
+; Auto Generated 20141117_221645.757
 

BIN
src/bin/hamcore/inf/selow_x86/inf.cat


+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN10.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN10.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN100.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN100.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN101.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN101.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN102.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN102.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN103.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN103.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN104.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN104.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN105.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN105.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN106.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN106.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN107.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN107.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN108.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN108.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN109.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN109.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN11.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN11.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN110.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN110.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN111.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN111.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN112.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN112.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN113.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN113.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN114.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN114.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN115.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN115.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN116.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN116.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN117.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN117.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN118.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN118.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN119.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN119.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN12.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN12.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN120.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN120.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN121.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN121.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN122.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN122.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN123.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN123.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN124.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN124.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN125.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN125.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN126.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN126.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN127.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN127.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN13.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN13.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN14.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN14.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN15.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN15.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN16.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN16.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN17.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN17.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN18.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN18.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN19.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN19.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN2.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN2.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN20.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN20.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN21.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN21.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN22.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN22.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN23.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN23.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN24.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN24.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN25.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN25.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN26.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN26.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN27.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN27.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN28.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN28.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN29.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN29.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN3.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN3.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN30.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN30.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN31.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN31.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN32.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN32.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN33.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN33.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN34.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN34.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN35.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN35.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN36.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN36.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN37.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN37.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN38.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN38.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN39.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN39.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN4.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN4.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN40.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN40.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN41.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN41.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN42.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN42.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN43.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN43.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN44.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN44.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN45.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN45.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN46.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN46.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN47.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN47.cat
 

+ 1 - 1
src/bin/hamcore/inf/x64/INF_VPN48.inf

@@ -8,7 +8,7 @@ Signature					= "$Windows NT$"
 Class						= Net
 ClassGUID					= {4D36E972-E325-11CE-BFC1-08002BE10318}
 Provider					= %CompanyName%
-DriverVer					= 10/22/2014, 4.11.0.9506
+DriverVer					= 11/17/2014, 4.12.0.9514
 
 CatalogFile.NT				= inf_VPN48.cat
 

Some files were not shown because too many files changed in this diff