[Twisted-Python] Anyone added NAPTR support to Twisted Names ?

Roland Hedberg roland.hedberg at adm.umu.se
Sat Nov 25 12:06:57 MST 2006


Roland Hedberg wrote:
> Roland Hedberg wrote:
>> There is no support what I can see in the present distribution, but
>> someone might have needed it and done a local patch.
>>
>> I've made a not so well thought out attempt to add it myself, but I my
>> client (dig) responds with "Warning: Message parser reports malformed
>> message packet."
> 
> Looking a bit further it turns out that the current definition of the
> decode function in the Class Name in dns.py is *not* compatible with the
> NAPTR definition in RFC 2915. Three strings in a sequence representing
> different parts (as with flags,services and regexp in a NAPTR record )
> is just handled wrongly.
> 
> I'll make an attempt at fixing this if no one beats me to it.

My error!

The problem was not in the Name Class which is perfectly suitable for
its purpose. The error was in using it for something which in the RFC is
defined as a character-string.

The solution was of course to define a new class (Charstr) and to give
it the appropriate implementation.

If anyone wants the fix I can send you a diff.

-- Roland





More information about the Twisted-Python mailing list