]> gitweb.michael.orlitzky.com - djbdns-logparse.git/commitdiff
djbdns/dnscache.py: improve two comments.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 22 Sep 2022 01:00:15 +0000 (21:00 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 22 Sep 2022 01:00:15 +0000 (21:00 -0400)
djbdns/dnscache.py

index a7fc56d3abb3a67066574ca09e78acd14dd470e6..785121b65d0541d04005654ebf0c59a7a7144dd7 100644 (file)
@@ -287,9 +287,11 @@ def handle_dnscache_log(line : str) -> Optional[str]:
         decode_ttl(words, 1)
         if words[2] not in ("cname", "mx", "ns", "ptr", "soa"):
             decode_type(words, 2)
-            if words[2] == "a":         # decode answer to an A query
+            if words[2] == "a":
+                # Decode the response to an 'A' query
                 decode_ip(words, 4)
-            if words[2] == "txt":       # text record
+            if words[2] == "txt":
+                # Decode the TXT record's data from hex to ASCII.
                 response = words[4]
                 if response.endswith("..."):
                     ellipsis = "..."