[Twisted-Python] CNAMES and twisted.names in 0.17.3
Glyph Lefkowitz
glyph at twistedmatrix.com
Sun May 5 18:17:25 MDT 2002
Can someone who knows the twisted.names codebase please stand up? I
will apply this patch if nobody says anything about it in the next
week...
On Sat, 2002-05-04 at 13:22, Doobee R. Tzeck wrote:
>
> 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/
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
--
| <`'> | Glyph Lefkowitz: Travelling Sorcerer |
| < _/ > | Lead Developer, the Twisted project |
| < ___/ > | http://www.twistedmatrix.com |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: </pipermail/twisted-python/attachments/20020505/0e7d3a2d/attachment.sig>
More information about the Twisted-Python
mailing list