From c44d8b51ffb5a413f8bbdbd9991bbc573853e397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henryk=20Pl=C3=B6tz?= Date: Fri, 3 Oct 2014 20:04:14 +0200 Subject: Apply patch djbdns-1.05-test27.diff.bz2 Source was http://www.fefe.de/dns/djbdns-1.05-test27.diff.bz2, SHA1 f0380ec1866f49c0bcf6369a923ac0a4a5095da8 --- dnsq.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'dnsq.c') diff --git a/dnsq.c b/dnsq.c index 533e6af..9e89efe 100644 --- a/dnsq.c +++ b/dnsq.c @@ -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(); -- cgit v1.2.3