From d9b7637fd850c85e9992204fea899d66353fff33 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 1 Oct 2011 01:53:22 +0000 Subject: [PATCH] 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] --- CHANGELOG | 5 +++++ osscan2.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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;