From: W.C.A. Wijngaards Date: Tue, 1 Apr 2025 11:51:09 +0000 (+0200) Subject: * Fix RR types NSAP-PTR, GPOS and RESINFO to print unquoted strings. X-Git-Tag: 1.9.0-rc.1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73fe1994c40ee7dd6a6df78d4a7082e7a9c369e4;p=thirdparty%2Fldns.git * Fix RR types NSAP-PTR, GPOS and RESINFO to print unquoted strings. --- diff --git a/Changelog b/Changelog index 19cfc4f1..c14a2957 100644 --- a/Changelog +++ b/Changelog @@ -16,6 +16,7 @@ * Add ldns-verify-zone -s option. It checks all signature results, instead of passing by when one RRSIG validates. That prints output for spurious RRSIGs, the failures for them. + * Fix RR types NSAP-PTR, GPOS and RESINFO to print unquoted strings. 1.8.4 2024-07-19 * Fix building documentation in build directory. diff --git a/host2str.c b/host2str.c index deeeaf63..f9dde7c6 100644 --- a/host2str.c +++ b/host2str.c @@ -1224,6 +1224,34 @@ ldns_rdf2buffer_str_eui64(ldns_buffer *output, const ldns_rdf *rdf) return ldns_buffer_status(output); } +ldns_status +ldns_rdf2buffer_str_unquoted(ldns_buffer *output, const ldns_rdf *rdf) +{ + size_t amount, i; + uint8_t ch; + if(ldns_rdf_size(rdf) < 1) { + return LDNS_STATUS_WIRE_RDATA_ERR; + } + if((int)ldns_rdf_size(rdf) < (int)ldns_rdf_data(rdf)[0] + 1) { + return LDNS_STATUS_WIRE_RDATA_ERR; + } + amount = ldns_rdf_data(rdf)[0]; + for(i=0; i