No routing/sending destination for ZeroIPString
pinging 0.0.0.0 should not go anywhere, but previously it could be routed anywhere by default gateways etc. Scenario: Level 3 It's dead Jim 1.) set the gateway for PC2 to router2 2.) ping net_switch1 The ping travels halfway around the network before it is dropped. Even worse is L4 Who done it, where originally the puzzle could be solved by just pinging 0.0.0.0 enough times.
This commit is contained in:
parent
4a72518ccc
commit
5e39a2896d
@ -2832,7 +2832,12 @@ namespace EduNetworkBuilder
|
|||||||
NetworkCard tCard = null;
|
NetworkCard tCard = null;
|
||||||
NB_IPAddress DestAddr;
|
NB_IPAddress DestAddr;
|
||||||
string DHCPGW = "";
|
string DHCPGW = "";
|
||||||
foreach( NB_IPAddress ip in RouteTable)
|
|
||||||
|
//Do not ping the zero string. Should not go anywhere
|
||||||
|
if (dest != null && dest.GetIPString == NB.ZeroIPString)
|
||||||
|
return new NB_IPAddress(NB.ZeroIPString);
|
||||||
|
|
||||||
|
foreach ( NB_IPAddress ip in RouteTable)
|
||||||
{
|
{
|
||||||
if (ip.IsLocal(dest))
|
if (ip.IsLocal(dest))
|
||||||
return new NB_IPAddress(ip.GetGateway.ToIpString());//We return the gateway
|
return new NB_IPAddress(ip.GetGateway.ToIpString());//We return the gateway
|
||||||
|
Loading…
Reference in New Issue
Block a user