[Twisted-Python] CNAMES and twisted.names in 0.17.3
Doobee R. Tzeck
drt at un.bewaff.net
Sat May 4 12:22:16 MDT 2002
I had some problems with the resolver generating tracebacks for
CNAMEs. The decoding has an off by two error which completely
messes up the decoding process. The attached patch seems to cure
the problem, but I'm not sure why the author of twisted.names did
this fiddeling with the offset. Perhaps I'm breaking something else.
BTW: The Bugtracker eats my (MacOS) lineendings.
drt
http://twistedmatrix.com/users/itamarst.twistd/bugs/view_bug?bug_id=12
http://c0re.jp/c0de/misc/Twisted-0.17.3-dns-CNAME.patch
diff -ur Twisted-0.17.3-orig/twisted/names/dns.py
Twisted-0.17.3/twisted/names/dns.py
--- Twisted-0.17.3-orig/twisted/names/dns.py Tue Apr 9 22:37:00 2002
+++ Twisted-0.17.3/twisted/names/dns.py Sat May 4 20:06:51 2002
@@ -156,7 +156,7 @@
if answer.type == 1:
answers.append(answer)
elif answer.type == dns.CNAME:
- answer.strio.seek(answer.strioOff+2)
+ answer.strio.seek(answer.strioOff)
n = dns.Name()
n.decode(answer.strio)
cnames.append(n.name)
@@ -168,7 +168,7 @@
if answer.type == 1:
answers.append(cnameMap[name])
else:
- answer.strio.seek(answer.strioOff+2)
+ answer.strio.seek(answer.strioOff)
n = dns.Name()
n.decode(answer.strio)
name = n.name
--
teenage mutant ninja hero coders from da c0re - http://c0re.jp/
me - http://koeln.ccc.de/~drt/
More information about the Twisted-Python
mailing list