drill_pkt_print_footer(stdout, local_res, p);
/* remove the old nameserver from the resolver */
- while((pop = ldns_resolver_pop_nameserver(res))) { /* do it */ }
+ while(ldns_resolver_pop_nameserver(res)) { /* do it */ }
/* also check for new_nss emptyness */
printf(";; There is an empty non-terminal here, continue\n");
continue;
}
- goto done;
}
if (ldns_resolver_nameserver_count(res) == 0) {
ldns_pkt_set_opcode(notify, LDNS_PACKET_NOTIFY);
ldns_pkt_push_rr(notify, LDNS_SECTION_QUESTION, question);
ldns_pkt_set_aa(notify, true);
- ldns_pkt_set_id(notify, random()&0xffff);
+ ldns_pkt_set_random_id(notify);
if(include_soa) {
char buf[10240];
ldns_rr *soa_rr=NULL;
}
}
- if (!origin) {
- origin = ldns_rr_owner(orig_soa);
- }
-
/* read the ZSKs */
argi = 1;
while (argi < argc) {
printf(";; trying UPDATE with FQDN \"%s\" and IP \"%s\"\n",
fqdn, ipaddr ? ipaddr : "<none>");
- printf(";; tsig: \"%s\" \"%s\" \"%s\"\n", tsig_cr.keyname,
- tsig_cr.algorithm, tsig_cr.keydata);
+ if (argc == 6 || argc == 7) {
+ printf(";; tsig: \"%s\" \"%s\" \"%s\"\n", tsig_cr.keyname,
+ tsig_cr.algorithm, tsig_cr.keydata);
+ }
ret = ldns_update_send_simple_addr(fqdn, zone, ipaddr, port, defttl, tsig_cred);
exit(ret);
}
/* resize accordingly */
- *result = (uint8_t*)LDNS_XREALLOC(answer, uint8_t *, (size_t)*answer_size);
+ *result = LDNS_XREALLOC(answer, uint8_t, (size_t)*answer_size);
if(!*result) {
LDNS_FREE(answer);
return LDNS_STATUS_MEM_ERR;