From: Miek Gieben Date: Wed, 16 Mar 2005 12:12:15 +0000 (+0000) Subject: some nonworking stuff X-Git-Tag: release-0.50~238 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e90df2fda9c5144503717455e43bcdb9fda8c39b;p=thirdparty%2Fldns.git some nonworking stuff --- diff --git a/TODO b/TODO index a921e0b0..54296cd1 100644 --- a/TODO +++ b/TODO @@ -15,6 +15,7 @@ o DNSSEC - do we call random()? o Make a shared library and test compile some programs o Thread safety, strtok is used +o NSEC cannot be converted from str to host fmt o ssl autoconf o create a bunch of small programs: dig diff --git a/host2str.c b/host2str.c index 739457aa..0b92c19a 100644 --- a/host2str.c +++ b/host2str.c @@ -491,7 +491,6 @@ ldns_rdf2buffer_str_nsec(ldns_buffer *output, ldns_rdf *rdf) bitmap_length = data[pos+1]; pos += 2; - for (bit_pos = 0; bit_pos < (bitmap_length) * 8; bit_pos++) { if (get_bit(&data[pos], bit_pos)) { type = 256 * (uint16_t) window_block_nr + bit_pos; diff --git a/rr.c b/rr.c index e35205e8..f546c949 100644 --- a/rr.c +++ b/rr.c @@ -157,7 +157,9 @@ ldns_rr_new_frm_str(const char *str) r_max = ldns_rr_descriptor_maximum(desc); r_min = ldns_rr_descriptor_minimum(desc); + /* this breaks with nsec */ for(rd = strtok(rdata, "\t \0"), r_cnt =0; rd; rd = strtok(NULL, "\t \0"), r_cnt++) { + printf("rd found %s\n", rd); r = ldns_rdf_new_frm_str( ldns_rr_descriptor_field_type(desc, r_cnt), rd); diff --git a/run-test17.c b/run-test17.c index 15eff94c..92342e18 100644 --- a/run-test17.c +++ b/run-test17.c @@ -13,6 +13,7 @@ main(void) ldns_rr *key; ldns_rr *ds; ldns_rdf *ch; + ldns_rr *nsec; key = ldns_rr_new_frm_str("nlnetlabs.nl. 86400 IN DNSKEY 257 3 RSASHA1 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9NLby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1UBYtEIQ=="); @@ -23,6 +24,8 @@ main(void) ds = ldns_key_rr2ds(key); + nsec = ldns_rr_new_frm_str("nlnetlabs.nl. 18000 IN NSEC _sip._udp.nlnetlabs.nl. NS SOA MX TXT RRSIG NSEC DNSKEY"); + printf("\nand now the DS\n"); printf("rdata count %d\n", ldns_rr_rd_count(ds)); ldns_rr_print(stdout, ds);