[tor-commits] [ooni-probe/master] Decode correct protocol
art at torproject.org
art at torproject.org
Wed Nov 6 09:12:44 UTC 2013
commit 7df1f620074ed933b46c9361d7969d65184b81a5
Author: aagbsn <aagbsn at extc.org>
Date: Wed Oct 16 16:52:25 2013 +0000
Decode correct protocol
No wonder it didn't work.
---
ooni/nettests/manipulation/traceroute.py | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/ooni/nettests/manipulation/traceroute.py b/ooni/nettests/manipulation/traceroute.py
index 2db1826..42d5f8d 100644
--- a/ooni/nettests/manipulation/traceroute.py
+++ b/ooni/nettests/manipulation/traceroute.py
@@ -62,16 +62,10 @@ class TracerouteTest(scapyt.BaseScapyTest):
answered, unanswered = packets
self.report['hops_'+str(port)] = []
for snd, rcv in answered:
- try:
- sport = snd[UDP].sport
- except IndexError:
- log.err("Source port for this traceroute was not found. This is probably a bug")
- sport = -1
-
report = {'ttl': snd.ttl,
'address': rcv.src,
'rtt': rcv.time - snd.time,
- 'sport': sport
+ 'sport': snd[TCP].sport
}
log.debug("%s: %s" % (port, report))
self.report['hops_'+str(port)].append(report)
More information about the tor-commits
mailing list