diff --git a/EduNetworkBuilder/NetworkCard.cs b/EduNetworkBuilder/NetworkCard.cs index 1d7d5d5..0f32875 100644 --- a/EduNetworkBuilder/NetworkCard.cs +++ b/EduNetworkBuilder/NetworkCard.cs @@ -701,6 +701,15 @@ namespace EduNetworkBuilder } } } + if (nf != null && nf.myIP != null && nf.myIP.GetIPString != NB.ZeroIPString) + { + //If the source IP is empty then it originated from here. We set the source to be us + if (tPacket.sourceIP == null || tPacket.sourceIP.GetIPString == NB.ZeroIPString) + { + tPacket.sourceIP = nf.myIP; + WhereFrom.StoreOutgoingPacketInfo(tPacket); //the packet is not yet tunneled + } + } if (nf.isLocal(tPacket.OutboundIP, false)) { //We need to tell the original packet that it is inside another packet