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 /printrecord.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 'printrecord.c')
-rw-r--r-- | printrecord.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/printrecord.c b/printrecord.c index ed0b42d..4bc7c3e 100644 --- a/printrecord.c +++ b/printrecord.c @@ -4,6 +4,7 @@ #include "byte.h" #include "dns.h" #include "printrecord.h" +#include "ip6.h" static char *d; @@ -82,6 +83,15 @@ unsigned int printrecord_cat(stralloc *out,const char *buf,unsigned int len,unsi if (!stralloc_catulong0(out,ch,0)) return 0; } } + else if (byte_equal(misc,2,DNS_T_AAAA)) { + char ip6str[IP6_FMT]; + int stringlen; + if (datalen != 16) { errno = error_proto; return 0; } + if (!stralloc_cats(out," AAAA ")) return 0; + pos = dns_packet_copy(buf,len,pos,misc,16); if (!pos) return 0; + stringlen=ip6_fmt(ip6str,misc); + if (!stralloc_catb(out,ip6str,stringlen)) return 0; + } else { if (!stralloc_cats(out," ")) return 0; uint16_unpack_big(misc,&u16); |