wap issues

This commit is contained in:
Tim Young 2015-09-01 18:19:31 -05:00
parent fe37d98e9b
commit df31ce9930

View File

@ -380,7 +380,7 @@ namespace EduNetworkBuilder
if (NB.GetComponentType(tPacket.WhereAmI) != GeneralComponentType.device) return false; //we cannot do this.
NetworkDevice WhereFrom = (NetworkDevice)tPacket.WhereAmI;
NicType what = GetNicType;
if (!tPacket.isFresh && WhereFrom.IsWirelessForwarder() && what == NicType.wlan)
if (!tPacket.isFresh && WhereFrom.IsWirelessForwarder() && (what == NicType.wlan || (WhereFrom.GetNetType() == NetworkComponentType.wap && what == NicType.eth)))
what = NicType.wport;
switch (what)
@ -557,7 +557,7 @@ namespace EduNetworkBuilder
//Need to find the managament interface MAC
nPacket.sourceMAC = WhereFrom.HubManagementMAC();
}
if(nPacket.sourceIP == null || nPacket.sourceIP.GetIPString == NB.ZeroIPString)
if(nPacket.sourceIP == null || nPacket.sourceIP.GetIPString == NB.ZeroIPString && (nPacket.MyType != PacketType.dhcp_request && !tPacket.isFresh))
{
//set it to be the ip of management interface
nPacket.sourceIP = WhereFrom.HubManagementIP();
@ -600,7 +600,8 @@ namespace EduNetworkBuilder
nd = mynet.GetDeviceFromID(myID);
if (tPacket == null) return;
tPacket.InboundNic = this; //track which nic we came in on.
if (myNicType == NicType.port || myNicType == NicType.wport || (nd.IsWirelessForwarder() && myNicType == NicType.wlan))
if (myNicType == NicType.port || myNicType == NicType.wport || (nd.IsWirelessForwarder() && (myNicType == NicType.wlan ||
(myNicType == NicType.eth && nd.GetNetType() == NetworkComponentType.wap ))))
{
//Try tracking the arp if we can
if (tPacket.TsourceIP == null) tPacket.TsourceIP = tPacket.sourceIP;