[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Decode correct protocol
commit 7df1f620074ed933b46c9361d7969d65184b81a5
Author: aagbsn <aagbsn@xxxxxxxx>
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)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits