Skip to content
Snippets Groups Projects
Commit db1af41c authored by Guillaume Valadon's avatar Guillaume Valadon
Browse files

Merge pull request #185 from p-l-/fix-traceroute-graph

Traceroute: fix graph
parents d52972b3 11dc2c09
No related branches found
No related tags found
No related merge requests found
......@@ -995,7 +995,8 @@ PacketList.timeskew_graph = new.instancemethod(_packetlist_timeskew_graph, None,
### Create a new packet list
class TracerouteResult(SndRcvList):
__slots__ = ["graphdef", "graphASres", "padding", "hloc", "nloc"]
__slots__ = ["graphdef", "graphpadding", "graphASres", "padding", "hloc",
"nloc"]
def __init__(self, res=None, name="Traceroute", stats=None):
PacketList.__init__(self, res, name, stats)
self.graphdef = None
......@@ -1273,7 +1274,8 @@ class TracerouteResult(SndRcvList):
bhip = {}
for rtk in rt:
trace = rt[rtk]
for n in xrange(min(trace), max(trace)):
max_trace = max(trace)
for n in xrange(min(trace), max_trace):
if not trace.has_key(n):
trace[n] = unknown_label.next()
if not ports_done.has_key(rtk):
......@@ -1288,7 +1290,7 @@ class TracerouteResult(SndRcvList):
ips[bh] = None
bhip[rtk[1]] = bh
bh = '"%s"' % bh
trace[max(k)+1] = bh
trace[max_trace + 1] = bh
blackholes.append(bh)
# Find AS numbers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment