diff --git a/EduNetworkBuilder/NetworkCard.cs b/EduNetworkBuilder/NetworkCard.cs index 661ef94..b55296d 100644 --- a/EduNetworkBuilder/NetworkCard.cs +++ b/EduNetworkBuilder/NetworkCard.cs @@ -235,6 +235,7 @@ namespace EduNetworkBuilder if (dest == null) return false; foreach (NetworkInterface iface in interfaces) { + if (iface.myIP.BroadcastAddress == 0) continue; //a netmask of 0.0.0.0 causes grief if (iface.myIP.BroadcastAddress == dest.GetIP) return true;//If they are pinging the broadcast IP if (iface.myIP.GetIPString == NB.BroadcastIPString) diff --git a/EduNetworkBuilder/NetworkDevice.cs b/EduNetworkBuilder/NetworkDevice.cs index ae5b114..7edb9b1 100644 --- a/EduNetworkBuilder/NetworkDevice.cs +++ b/EduNetworkBuilder/NetworkDevice.cs @@ -1028,6 +1028,7 @@ namespace EduNetworkBuilder //} public bool HasBroadcastAddress(IPAddress dest) { + if (dest.BroadcastAddress == dest.GetIP) return true; foreach(NetworkCard nic in NICs) { if (nic.HasBroadcastAddresses(dest)) @@ -1367,8 +1368,10 @@ namespace EduNetworkBuilder { // if (nic == tPacket.InboundNic) break; //this case is dealt with in nic.SendPacketOutNic //Pass it to the NIC to send out each nic+interface. - //The nic checks to see if it works and then processes it - if (!tPacket.isFresh && HasBroadcastAddress(tPacket.destIP)) break; + //The nic checks to see if it works and then processes it + if(myType != NetworkComponentType.wbridge && myType != NetworkComponentType.wrepeater) + if (!tPacket.isFresh && HasBroadcastAddress(tPacket.destIP)) + break; string tMAC = tPacket.destMAC; string ttMAC = tPacket.OutboundDestMAC; if (BroadcastMatch && tPacket.MyType != PacketType.dhcp_answer) @@ -1701,6 +1704,13 @@ namespace EduNetworkBuilder { dst = RequestDHCPLease(tPacket.sourceMAC, tPacket.InboundInterface.myIP); } + //if we the packet came in on a port... + if (tPacket.InboundNic.GetNicType == NicType.wport || tPacket.InboundNic.GetNicType == NicType.port) + { + IPAddress theIP = HubManagementIP(); + if (theIP != null) + dst = RequestDHCPLease(tPacket.sourceMAC, theIP); + } string tmac = nPacket.sourceMAC; nPacket.sourceMAC = tPacket.OutboundMAC; if (tPacket.InboundInterface != null) diff --git a/EduNetworkBuilder/Resources/ReleaseNotes.rtf b/EduNetworkBuilder/Resources/ReleaseNotes.rtf index 40785d9..f2067f5 100644 --- a/EduNetworkBuilder/Resources/ReleaseNotes.rtf +++ b/EduNetworkBuilder/Resources/ReleaseNotes.rtf @@ -1,9 +1,10 @@ {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}} {\*\generator Riched20 10.0.10240}\viewkind4\uc1 -\pard\sa200\sl276\slmult1\b\f0\fs22\lang9 Version 1.0.23 \par +\pard\sa200\sl276\slmult1\b\f0\fs22\lang9 Version 1.0.23 09/20/2015\par \b0 * Fixed issues with broadcast packets\par * Fixed a network loop issue\par -* Fixed issue with multiple interfaces and being able to go out a different interface than we came in on\b\par +* Fixed issue with multiple interfaces and being able to go out a different interface than we came in on\par +* Fixed many small bugs that crept in when fixing other bugs. Now all puzzles seem to play correctly\b\par Version 1.0.22 09/01/2015\b0\par * Added ssid and keys for wireless links\par * Wireless will auto-disconnect if link is too long\par