@@ -115,7 +115,7 @@ class DNSQuestion(DNSEntry):
115115
116116 def __init__ (self , name : str , type_ : int , class_ : int ) -> None :
117117 super ().__init__ (name , type_ , class_ )
118- self ._hash = hash ((self .key , type_ , class_ ))
118+ self ._hash = hash ((self .key , type_ , self . class_ ))
119119
120120 def answered_by (self , rec : 'DNSRecord' ) -> bool :
121121 """Returns true if the question is answered by the record"""
@@ -247,7 +247,7 @@ def __init__(
247247 super ().__init__ (name , type_ , class_ , ttl , created )
248248 self .address = address
249249 self .scope_id = scope_id
250- self ._hash = hash ((self .key , type_ , class_ , address , scope_id ))
250+ self ._hash = hash ((self .key , type_ , self . class_ , address , scope_id ))
251251
252252 def write (self , out : 'DNSOutgoing' ) -> None :
253253 """Used in constructing an outgoing packet"""
@@ -290,7 +290,7 @@ def __init__(
290290 super ().__init__ (name , type_ , class_ , ttl , created )
291291 self .cpu = cpu
292292 self .os = os
293- self ._hash = hash ((self .key , type_ , class_ , cpu , os ))
293+ self ._hash = hash ((self .key , type_ , self . class_ , cpu , os ))
294294
295295 def write (self , out : 'DNSOutgoing' ) -> None :
296296 """Used in constructing an outgoing packet"""
@@ -326,7 +326,7 @@ def __init__(
326326 ) -> None :
327327 super ().__init__ (name , type_ , class_ , ttl , created )
328328 self .alias = alias
329- self ._hash = hash ((self .key , type_ , class_ , alias ))
329+ self ._hash = hash ((self .key , type_ , self . class_ , alias ))
330330
331331 @property
332332 def max_size_compressed (self ) -> int :
@@ -367,7 +367,7 @@ def __init__(
367367 assert isinstance (text , (bytes , type (None )))
368368 super ().__init__ (name , type_ , class_ , ttl , created )
369369 self .text = text
370- self ._hash = hash ((self .key , type_ , class_ , text ))
370+ self ._hash = hash ((self .key , type_ , self . class_ , text ))
371371
372372 def write (self , out : 'DNSOutgoing' ) -> None :
373373 """Used in constructing an outgoing packet"""
@@ -411,7 +411,7 @@ def __init__(
411411 self .weight = weight
412412 self .port = port
413413 self .server = server
414- self ._hash = hash ((self .key , type_ , class_ , priority , weight , port , server ))
414+ self ._hash = hash ((self .key , type_ , self . class_ , priority , weight , port , server ))
415415
416416 def write (self , out : 'DNSOutgoing' ) -> None :
417417 """Used in constructing an outgoing packet"""
@@ -459,7 +459,7 @@ def __init__(
459459 super ().__init__ (name , type_ , class_ , ttl , created )
460460 self .next_name = next_name
461461 self .rdtypes = rdtypes
462- self ._hash = hash ((self .key , type_ , class_ , next_name , * self .rdtypes ))
462+ self ._hash = hash ((self .key , type_ , self . class_ , next_name , * self .rdtypes ))
463463
464464 def __eq__ (self , other : Any ) -> bool :
465465 """Tests equality on cpu and os"""
0 commit comments