From 8fd7a0a46b8acf8238f414cd6b1ebfa844ffad90 Mon Sep 17 00:00:00 2001 From: david Date: Sun, 27 Sep 2009 18:05:16 +0000 Subject: [PATCH] Always begin with a TTL of at least 1 in traceroute, even if OS detection calculated 0 (erroneous if not localhost). This caused an assertion failure reported by Chris Clements in http://seclists.org/nmap-dev/2009/q3/1054.html. --- traceroute.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/traceroute.cc b/traceroute.cc index f051131c3..ec19c4f3d 100644 --- a/traceroute.cc +++ b/traceroute.cc @@ -332,7 +332,7 @@ static unsigned int hop_cache_size(); HostState::HostState(Target *target) { this->target = target; - current_ttl = HostState::distance_guess(target); + current_ttl = MAX(1, HostState::distance_guess(target)); state = HostState::COUNTING_DOWN; reached_target = 0; pspec = HostState::get_probe(target);