Fix wireless devices connecting to WLAN when no ssid is set

This commit is contained in:
Tim Young 2015-08-28 07:08:01 -07:00
parent e82403522b
commit cf4538b585

View File

@ -183,7 +183,9 @@ namespace EduNetworkBuilder
CanAddNics = true;
setNicsCanUseDHCP(true);
}
if (myType == NetworkComponentType.net_switch || myType == NetworkComponentType.net_hub)
if (myType == NetworkComponentType.net_switch || myType == NetworkComponentType.net_hub ||
myType == NetworkComponentType.wap || myType == NetworkComponentType.wbridge ||
myType == NetworkComponentType.wrepeater)
{
CanServeDHCP = false;
CanUseDHCP = true;
@ -720,6 +722,8 @@ namespace EduNetworkBuilder
public NetworkCard HasWPortSSIDKey(string SSID, string Key)
{
if (SSID == null) return null;
if (Key == null) return null;
foreach(NetworkCard nic in NICs)
{
if(nic.GetNicType == NicType.wport && !nic.isConnected(false))
@ -1012,10 +1016,14 @@ namespace EduNetworkBuilder
{
if (myType == NetworkComponentType.net_hub) return true;
if (myType == NetworkComponentType.net_switch) return true;
if (myType == NetworkComponentType.wap) return true;
if (myType == NetworkComponentType.wbridge) return true;
if (myType == NetworkComponentType.wrepeater) return true;
if (myType == NetworkComponentType.wrouter) return true;
if (myType == NetworkComponentType.wap)
return true;
if (myType == NetworkComponentType.wbridge)
return true;
if (myType == NetworkComponentType.wrepeater)
return true;
if (myType == NetworkComponentType.wrouter)
return true;
return false;
}