From f5cb1875d2824c722dbf0b075ed537a26e8d0743 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Sat, 13 Apr 2019 10:13:12 -0500 Subject: [PATCH] Allow forwarding devices to respond to tracert_requests Things like switches could not be tracert'd. Scenario: Level 3 It is dead, Jim. 1.) from PC2, do a tracert to net_switch0. Notice that there is no response. --- EduNetworkBuilder/NetworkDevice.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/EduNetworkBuilder/NetworkDevice.cs b/EduNetworkBuilder/NetworkDevice.cs index 14de7f4..c8852c3 100644 --- a/EduNetworkBuilder/NetworkDevice.cs +++ b/EduNetworkBuilder/NetworkDevice.cs @@ -3210,14 +3210,16 @@ namespace EduNetworkBuilder } } - if (!ForwardsPackets()) + if (!ForwardsPackets() || HasIPAddress(tPacket.destIP)) { //Traceroute bounce-back - if(tPacket.MyType == PacketType.tracert_request) + if (tPacket.MyType == PacketType.tracert_request) { if (ProcessTracertPacket(tPacket)) return; //the packet stops if it gets bounced. } - + } + if (!ForwardsPackets()) + { if (tPacket.MyType == PacketType.dhcp_request && !isDHCPServer) { tPacket.AddMessage(DebugLevel.debug, NB.LeftPad(hostname) + " " +string.Format(NB.Translate("ND_DoInFromLnkDeaf")));