Fix a null IP address issue

This commit is contained in:
Tim Young 2017-10-05 11:09:31 -05:00
parent 27d3b88083
commit 2fccf241d7

View File

@ -707,7 +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.
if ((nPacket.sourceIP == null || 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)