diff --git a/CHANGELOG b/CHANGELOG index 7a4a36f24..fa626f07b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,10 @@ # Nmap Changelog ($Id$); -*-text-*- +o Increased hop distance estimates from OS detection by one. The + distance now counts the number of hops including the final one to + the target, not just the number of intermediate nodes. The IPv6 + distance calculation already worked this way. [David] + Nmap 5.61TEST2 [2011-09-30] o Added IPv6 OS detection system! The new system utilizes many tests diff --git a/osscan2.cc b/osscan2.cc index e0b307f98..508c4eeec 100644 --- a/osscan2.cc +++ b/osscan2.cc @@ -3059,7 +3059,7 @@ bool HostOsScan::processTUdpResp(HostOsScanStats *hss, struct ip *ip) { /* Count hop count */ if (hss->distance == -1) { - hss->distance = this->udpttl - ip2->ip_ttl; + hss->distance = this->udpttl - ip2->ip_ttl + 1; } return true;