diff options
author | Henryk Plötz <henryk@ploetzli.ch> | 2014-10-03 20:04:14 +0200 |
---|---|---|
committer | Henryk Plötz <henryk@ploetzli.ch> | 2014-10-03 20:04:14 +0200 |
commit | c44d8b51ffb5a413f8bbdbd9991bbc573853e397 (patch) | |
tree | e7f2e644de620879f610c909c405cbc4e44d6062 /dnsq.c | |
parent | 0e5b2871ca6456b01d4bf037a6e68badf1ff1a41 (diff) | |
download | tinydnssec-c44d8b51ffb5a413f8bbdbd9991bbc573853e397.tar.gz tinydnssec-c44d8b51ffb5a413f8bbdbd9991bbc573853e397.tar.bz2 |
Apply patch djbdns-1.05-test27.diff.bz2
Source was http://www.fefe.de/dns/djbdns-1.05-test27.diff.bz2, SHA1 f0380ec1866f49c0bcf6369a923ac0a4a5095da8
Diffstat (limited to 'dnsq.c')
-rw-r--r-- | dnsq.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -10,6 +10,7 @@ #include "printpacket.h" #include "parsetype.h" #include "dns.h" +#include "ip6.h" #define FATAL "dnsq: fatal: " @@ -24,14 +25,14 @@ void oops(void) static struct dns_transmit tx; -int resolve(char *q,char qtype[2],char servers[64]) +int resolve(char *q,char qtype[2],char servers[256]) { struct taia stamp; struct taia deadline; iopause_fd x[1]; int r; - if (dns_transmit_start(&tx,servers,0,q,qtype,"\0\0\0\0") == -1) return -1; + if (dns_transmit_start(&tx,servers,0,q,qtype,V6any) == -1) return -1; for (;;) { taia_now(&stamp); @@ -47,7 +48,7 @@ int resolve(char *q,char qtype[2],char servers[64]) return 0; } -char servers[64]; +char servers[256]; static stralloc ip; static stralloc fqdn; @@ -73,9 +74,9 @@ int main(int argc,char **argv) if (!*++argv) usage(); if (!stralloc_copys(&out,*argv)) oops(); - if (dns_ip4_qualify(&ip,&fqdn,&out) == -1) oops(); - if (ip.len >= 64) ip.len = 64; - byte_zero(servers,64); + if (dns_ip6_qualify(&ip,&fqdn,&out) == -1) oops(); + if (ip.len >= 256) ip.len = 256; + byte_zero(servers,256); byte_copy(servers,ip.len,ip.s); if (!stralloc_copys(&out,"")) oops(); |