[Pdns-users] HINFO records corrupted
Volker Goetz
goetz at sectionone.de
Fri Apr 30 22:44:38 UTC 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hallo,
Am Montag, 5. April 2004 21:29 schrieb Volker Goetz:
> HINFO records are corrupted by PowerDNS (Version 2.9.16). Both the
> server (pdns_server) and the optional recursor (pdns_recursor) are
> affected.
>
> The content of HINFO records are not parsed correctly leading to garbage
> in a query to the resolver. When doing slave service for some zone with
> HINFO records in it, the database rejects the garbage in the content
> field (invalid unicode characters for PostgreSQL, other backends may
> give different errors). In case of the bind backend the garbage is
> written to the zone file, which in turn is unparseable.
I've investigatet further into this problem and found out that the contents
are parsed wrong in DNSPacket::addHINFORecord. A rudimentary workaround
for me is to change the generation of host's contents like that:
if(offset==string::npos) {
cpu=content;
} else {
cpu=content.substr(0,offset);
host=content.substr(offset+2, (unsigned int)content[offset+1]);
}
As far as I've seen, from some data dump, the host content ist prefixed
with a lenght byte (which is at offset + 1). With this hack the cpu and
host part of the hinfo content are displayed correctly. Unfortunately, it
discards the additional and authority data and may have other impacts.
I have far too less knowledge on dns records and network packets, so I
can't help with more patches/hacks.
Are there any plans to correct the bug? I'd like to be able to use pdns as
slave server for zones with hinfo records, which is absolutely impossible
at the moment.
- --
Best regards
Volker Götz
- ---------------------------------------------------------------
section(one Mail goetz at sectionone.de
Dipl.-Inform. Univ. Web http://www.sectionone.de/
Volker Götz Tel. +49 30 / 40 00 67 9-0
Rosa-Luxemburg-Straße 15 Fax +49 30 / 40 00 67 9-15
D-10178 Berlin PGP 4FEB1C34 @ wwwkeys.de.pgp.net
- ---------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAktbZWM9gHU/rHDQRAtGDAJ4n7xAxMENfohLiHLZFJD/qQYdbtwCfTmKF
4hyGtxqBrWD3DV2Rctjr2m0=
=Tdbv
-----END PGP SIGNATURE-----
More information about the Pdns-users
mailing list