Network card makes error packet if going out the broken nic

This commit is contained in:
Tim Young 2018-04-04 13:04:31 +03:00
parent 18a8e6e3a1
commit 1e4c8b3273

View File

@ -478,6 +478,19 @@ namespace EduNetworkBuilder
if (!tPacket.isFresh && WhereFrom.IsWirelessForwarder() && (what == NicType.wlan || (WhereFrom.GetNetType() == NetworkComponentType.wap && what == NicType.eth))) if (!tPacket.isFresh && WhereFrom.IsWirelessForwarder() && (what == NicType.wlan || (WhereFrom.GetNetType() == NetworkComponentType.wap && what == NicType.eth)))
what = NicType.wport; what = NicType.wport;
if (myNet.ItemHasTest(WhereFrom.hostname, NicName(), NetTestType.DeviceNICSprays))
{
if (tPacket.MyType == PacketType.bad_packet) return false;
//We should drop the current packet.
tPacket.AddMessage(DebugLevel.info, NB.Translate("N_ProssShouldContinTime"));
tPacket.Tracking.Status = NB.Translate("N_ProssShouldContinTime");
tPacket.MyStatus = PacketStatus.finished_failed;
//Then, we make a bad packet go out from here
WhereFrom.BadPacketFromHere();
return false;
}
switch (what) switch (what)
{ {
case NicType.lo: case NicType.lo: