diff --git a/EduNetworkBuilder/NetworkCard.cs b/EduNetworkBuilder/NetworkCard.cs index 773bc0c..97ee23f 100644 --- a/EduNetworkBuilder/NetworkCard.cs +++ b/EduNetworkBuilder/NetworkCard.cs @@ -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)