traceroute doesn't work for less than 6 hops

Bug #297538 reported by Alexandru Guduleasa
6
Affects Status Importance Assigned to Milestone
traceroute (Debian)
Fix Released
Unknown
traceroute (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

this is the result for:
traceroute -m 5 www.google.com
sim hops out of range

I get the same result for 1,2,3,4 or 5 hops.

traceroute works fine starting from 6 hops

traceroute -m 6 www.google.com
traceroute to www.google.com (74.125.43.99), 6 hops max, 40 byte packets
 1 my.router (192.168.2.1) 0.411 ms 0.573 ms 0.734 ms
 2 10.12.0.1 (10.12.0.1) 8.199 ms 11.984 ms 17.415 ms
 3 ro-buh01a-rc1-v276.astralnet.ro (82.208.175.241) 18.098 ms 18.226 ms 18.465 ms
 4 85.186.212.13 (85.186.212.13) 27.406 ms 27.598 ms 27.789 ms
 5 ro-tm01a-rc1-v1058.astralnet.ro (78.96.78.50) 27.579 ms 28.103 ms 28.093 ms
 6 85.186.212.46 (85.186.212.46) 27.597 ms 24.128 ms 24.135 ms

Revision history for this message
Magnus S (magnuss) wrote :

I can confirm this.

Changed in traceroute:
status: New → Confirmed
Revision history for this message
Alexandru Guduleasa (gulyan89) wrote :

I think this should solve this problem:

paste from the changelog:
"initialized sim_probes with -1 and if not overwritten by the command line parameters, it is set to DEF_SIM_PROBES. If it is greater then max_hops*probes_per_hop, we lower it to this value so we can use it to trace less than 6 hops without explicitly specifying the -N parameter "

this is the line that caused the problem:
if (!sim_probes || sim_probes > max_hops * probes_per_hop)
  ex_error ("sim hops out of range");

by default you get if(16 > 3 * 5)
I've changed this so if you don't specify the sim_probes in the command line parameters and the default value is greater than max_hops*probes_per_hop, sim_probes will be initialised with (max_hops * probes_per_hop), thus avoiding the problem

Revision history for this message
Alexandru Guduleasa (gulyan89) wrote :

the fix may require additional testing

Changed in traceroute:
status: Confirmed → In Progress
Changed in traceroute (Ubuntu):
status: In Progress → Confirmed
Revision history for this message
Magnus S (magnuss) wrote :

This bug does not seem to occur in jaunty.

Revision history for this message
Graham Inggs (ginggs) wrote :

Fix released in 2.0.12-1 in jaunty.

Changed in traceroute (Ubuntu):
status: Confirmed → Fix Released
Changed in traceroute (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.