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.
This commit is contained in:
Tim Young 2019-04-13 10:13:12 -05:00
parent 5e39a2896d
commit f5cb1875d2

View File

@ -3210,14 +3210,16 @@ namespace EduNetworkBuilder
} }
} }
if (!ForwardsPackets()) if (!ForwardsPackets() || HasIPAddress(tPacket.destIP))
{ {
//Traceroute bounce-back //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 (ProcessTracertPacket(tPacket)) return; //the packet stops if it gets bounced.
} }
}
if (!ForwardsPackets())
{
if (tPacket.MyType == PacketType.dhcp_request && !isDHCPServer) if (tPacket.MyType == PacketType.dhcp_request && !isDHCPServer)
{ {
tPacket.AddMessage(DebugLevel.debug, NB.LeftPad(hostname) + " " +string.Format(NB.Translate("ND_DoInFromLnkDeaf"))); tPacket.AddMessage(DebugLevel.debug, NB.LeftPad(hostname) + " " +string.Format(NB.Translate("ND_DoInFromLnkDeaf")));