wap issues
This commit is contained in:
parent
fe37d98e9b
commit
df31ce9930
@ -380,7 +380,7 @@ namespace EduNetworkBuilder
|
|||||||
if (NB.GetComponentType(tPacket.WhereAmI) != GeneralComponentType.device) return false; //we cannot do this.
|
if (NB.GetComponentType(tPacket.WhereAmI) != GeneralComponentType.device) return false; //we cannot do this.
|
||||||
NetworkDevice WhereFrom = (NetworkDevice)tPacket.WhereAmI;
|
NetworkDevice WhereFrom = (NetworkDevice)tPacket.WhereAmI;
|
||||||
NicType what = GetNicType;
|
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;
|
what = NicType.wport;
|
||||||
|
|
||||||
switch (what)
|
switch (what)
|
||||||
@ -557,7 +557,7 @@ namespace EduNetworkBuilder
|
|||||||
//Need to find the managament interface MAC
|
//Need to find the managament interface MAC
|
||||||
nPacket.sourceMAC = WhereFrom.HubManagementMAC();
|
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
|
//set it to be the ip of management interface
|
||||||
nPacket.sourceIP = WhereFrom.HubManagementIP();
|
nPacket.sourceIP = WhereFrom.HubManagementIP();
|
||||||
@ -600,7 +600,8 @@ namespace EduNetworkBuilder
|
|||||||
nd = mynet.GetDeviceFromID(myID);
|
nd = mynet.GetDeviceFromID(myID);
|
||||||
if (tPacket == null) return;
|
if (tPacket == null) return;
|
||||||
tPacket.InboundNic = this; //track which nic we came in on.
|
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
|
//Try tracking the arp if we can
|
||||||
if (tPacket.TsourceIP == null) tPacket.TsourceIP = tPacket.sourceIP;
|
if (tPacket.TsourceIP == null) tPacket.TsourceIP = tPacket.sourceIP;
|
||||||
|
Loading…
Reference in New Issue
Block a user