##// END OF EJS Templates
zeroconf: don't fail on non-local names
Alexander Solovyov -
r8131:b0d945b9 default
parent child Browse files
Show More
@@ -259,7 +259,7 b' class DNSQuestion(DNSEntry):'
259
259
260 def __init__(self, name, type, clazz):
260 def __init__(self, name, type, clazz):
261 if not name.endswith(".local."):
261 if not name.endswith(".local."):
262 raise NonLocalNameException
262 raise NonLocalNameException(name)
263 DNSEntry.__init__(self, name, type, clazz)
263 DNSEntry.__init__(self, name, type, clazz)
264
264
265 def answeredBy(self, rec):
265 def answeredBy(self, rec):
@@ -492,8 +492,11 b' class DNSIncoming(object):'
492 info = struct.unpack(format, self.data[self.offset:self.offset+length])
492 info = struct.unpack(format, self.data[self.offset:self.offset+length])
493 self.offset += length
493 self.offset += length
494
494
495 question = DNSQuestion(name, info[0], info[1])
495 try:
496 self.questions.append(question)
496 question = DNSQuestion(name, info[0], info[1])
497 self.questions.append(question)
498 except NonLocalNameException:
499 pass
497
500
498 def readInt(self):
501 def readInt(self):
499 """Reads an integer from the packet"""
502 """Reads an integer from the packet"""
General Comments 0
You need to be logged in to leave comments. Login now