comparison hgext/zeroconf/Zeroconf.py @ 10387:9b87c5f4c634

zeroconf: use DNS length field to safely skip unknown record types
author Brendan Cully <brendan@kublai.com>
date Mon, 08 Feb 2010 00:01:08 +0100
parents 1ddb0ae26a55
children 1426b4807fc8
comparison
equal deleted inserted replaced
10386:1ddb0ae26a55 10387:9b87c5f4c634
558 # so this is left for debugging. New types 558 # so this is left for debugging. New types
559 # encountered need to be parsed properly. 559 # encountered need to be parsed properly.
560 # 560 #
561 #print "UNKNOWN TYPE = " + str(info[0]) 561 #print "UNKNOWN TYPE = " + str(info[0])
562 #raise BadTypeInNameException 562 #raise BadTypeInNameException
563 break 563 self.offset += info[3]
564 564
565 if rec is not None: 565 if rec is not None:
566 self.answers.append(rec) 566 self.answers.append(rec)
567 567
568 def isQuery(self): 568 def isQuery(self):