do not send packets out if there is no IP address for the nic / management interface.

This commit is contained in:
Tim Young 2017-09-01 15:51:08 -05:00
parent 4c68a20e98
commit 62de025513
1 changed files with 1 additions and 0 deletions

View File

@ -707,6 +707,7 @@ namespace EduNetworkBuilder
nl = myNet.GetLinkFromID(ConnectedLink);
if (nl == null)
break;
if (nPacket.sourceIP.GetIPString == NB.ZeroIPString && tPacket.MyType != PacketType.dhcp_request) return false; //We still have no IP. Do not send the packet out.
nPacket.StartOnLink(nl, WhereFrom); //This sends the packet down the link.
myNet.addPacket(nPacket);
if (tPacket.isFresh)