[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Fix serialisation of SOA queries and cast set to list



commit 07749637dd9d4d8b4c5f9ff9137a1dd9d2cafbd8
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date:   Thu Mar 24 13:37:41 2016 +0100

    Fix serialisation of SOA queries and cast set to list
---
 ooni/nettests/manipulation/captiveportal.py | 2 +-
 ooni/templates/dnst.py                      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ooni/nettests/manipulation/captiveportal.py b/ooni/nettests/manipulation/captiveportal.py
index f700973..b1cbba7 100644
--- a/ooni/nettests/manipulation/captiveportal.py
+++ b/ooni/nettests/manipulation/captiveportal.py
@@ -426,7 +426,7 @@ class CaptivePortal(httpt.HTTPTest, dnst.DNSTest):
         gmatch, google_dns_result = yield self.compare_random_hostnames(3, 10)
         ret = {
             'result': gmatch,
-            'addresses': google_dns_result
+            'addresses': list(google_dns_result)
         }
 
         if gmatch:
diff --git a/ooni/templates/dnst.py b/ooni/templates/dnst.py
index 9ee7508..b96fdec 100644
--- a/ooni/templates/dnst.py
+++ b/ooni/templates/dnst.py
@@ -72,8 +72,8 @@ def representAnswer(answer):
     }
     if answer_type is 'SOA':
         represented_answer['ttl'] = answer.payload.ttl
-        represented_answer['hostname'] = answer.payload.mname
-        represented_answer['responsible_name'] = answer.payload.rname
+        represented_answer['hostname'] = answer.payload.mname.name
+        represented_answer['responsible_name'] = answer.payload.rname.name
         represented_answer['serial_number'] = answer.payload.serial
         represented_answer['refresh_interval'] = answer.payload.refresh
         represented_answer['retry_interval'] = answer.payload.retry



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits