Wireless router dhcp server issue that crept in

This commit is contained in:
Tim Young 2015-09-01 17:19:00 -05:00
parent f78072b42f
commit 6284528248
2 changed files with 8 additions and 3 deletions

View File

@ -519,12 +519,17 @@ namespace EduNetworkBuilder
if (tPacket.InboundNic == this) if (tPacket.InboundNic == this)
break; //This is the port we came in on. Do not sent it back out this port break; //This is the port we came in on. Do not sent it back out this port
nPacket = new Packet(tPacket); nPacket = new Packet(tPacket);
if((tPacket.InboundNic != null && tPacket.InboundNic.GetNicType == NicType.wan) || tPacket.InboundNic == null) if((tPacket.InboundNic != null && tPacket.InboundNic.GetNicType == NicType.wan) || tPacket.InboundNic == null || tPacket.destMAC == "")
{ {
//We need to find destination MAC and set source MAC //We need to find destination MAC and set source MAC
nPacket.sourceMAC = MAC; nPacket.sourceMAC = MAC;
//Update the MAC //Update the MAC
nPacket.destMAC = WhereFrom.LookupArpFromIP(tPacket.OutboundIP.GetIPString); string getMAC="";
if (tPacket.OutboundIP != null)
getMAC = WhereFrom.LookupArpFromIP(tPacket.OutboundIP.GetIPString);
else if(tPacket.destIP != null)
getMAC = WhereFrom.LookupArpFromIP(tPacket.destIP.GetIPString);
if (getMAC != "") nPacket.destMAC = getMAC;
if (nPacket.MyType == PacketType.arp_request) if (nPacket.MyType == PacketType.arp_request)
{ {
nPacket.destMAC = NB.BroadcastMACString; nPacket.destMAC = NB.BroadcastMACString;

View File

@ -2197,7 +2197,7 @@ namespace EduNetworkBuilder
if (myType == NetworkComponentType.wap) return true; if (myType == NetworkComponentType.wap) return true;
if (myType == NetworkComponentType.wrouter) return true; if (myType == NetworkComponentType.wrouter) return true;
if (myType == NetworkComponentType.wrepeater) return true; if (myType == NetworkComponentType.wrepeater) return true;
if (myType == NetworkComponentType.wrouter) return true; if (myType == NetworkComponentType.wbridge) return true;
return false; return false;
} }
/// <summary> /// <summary>