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
1 changed files with 13 additions and 0 deletions

View File

@ -478,6 +478,19 @@ namespace EduNetworkBuilder
if (!tPacket.isFresh && WhereFrom.IsWirelessForwarder() && (what == NicType.wlan || (WhereFrom.GetNetType() == NetworkComponentType.wap && what == NicType.eth)))
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)
{
case NicType.lo: