Update pipeline: graph now maps IoT devices' MACs to hostnames or other MACs (if...
[pingpong.git] / parse_dns.py
index e81fd95e3477519f42599846987a1ed4a0e9e7ca..831b075bd31f2053d0bda9ea78c88a79332a16ac 100644 (file)
@@ -82,7 +82,8 @@ class DeviceDNSMap:
                                # t is a better fit if it happened BEFORE the input timestamp
                                # and is LATER than the current best_fit
                                best_fit = t
-               return best_fit
+               # return the matching hostname
+               return best_fit[1]
 
        def add_mapping(self, ip, timestamp_hostname_tuple):
                self.ip_mappings[ip].append(timestamp_hostname_tuple)