updated on Fri Jan 20 12:03:34 UTC 2012
[aur-mirror.git] / djbdns / ipv6intremove.patch
blobe6269dcc8162283e8d0fcd2665cf66e2a1dc1e56
1 diff --git a/dns.h b/dns.h
2 index 5398e2b..99bcdfd 100644
3 --- a/dns.h
4 +++ b/dns.h
5 @@ -88,7 +88,6 @@ extern int dns_ip4_qualify(stralloc *,stralloc *,const stralloc *);
6 extern int dns_ip6_qualify_rules(stralloc *,stralloc *,const stralloc *,const stralloc *);
7 extern int dns_ip6_qualify(stralloc *,stralloc *,const stralloc *);
9 -#define DNS_IP6_INT 0
10 #define DNS_IP6_ARPA 1
12 extern int dns_name6_domain(char *,const char *,int);
13 diff --git a/dns_name.c b/dns_name.c
14 index 518a0c0..3a4af22 100644
15 --- a/dns_name.c
16 +++ b/dns_name.c
17 @@ -65,6 +65,5 @@ int dns_name6(stralloc *out,const char ip[16])
18 if (ip6_isv4mapped(ip))
19 return dns_name4(out,ip+12);
20 if (dns_name6_inner(out,ip,DNS_IP6_ARPA)) return -1;
21 - if (!out->len) return dns_name6_inner(out,ip,DNS_IP6_INT);
22 return 0;
24 diff --git a/dns_nd6.c b/dns_nd6.c
25 index 6dbeb89..3142d93 100644
26 --- a/dns_nd6.c
27 +++ b/dns_nd6.c
28 @@ -1,3 +1,4 @@
30 #include "byte.h"
31 #include "fmt.h"
32 #include "dns.h"
33 @@ -5,7 +6,6 @@
34 /* RFC1886:
35 * 4321:0:1:2:3:4:567:89ab
36 * ->
37 - * b.a.9.8.7.6.5.0.4.0.0.0.3.0.0.0.2.0.0.0.1.0.0.0.0.0.0.0.1.2.3.4.IP6.INT.
38 * b.a.9.8.7.6.5.0.4.0.0.0.3.0.0.0.2.0.0.0.1.0.0.0.0.0.0.0.1.2.3.4.IP6.ARPA.
41 @@ -25,9 +25,7 @@ int dns_name6_domain(char name[DNS_NAME6_DOMAIN],const char ip[16],int t)
42 name[j*4+2]=1;
43 name[j*4+3]=tohex((unsigned char)ip[15-j] >> 4);
45 - if (t==DNS_IP6_INT)
46 - byte_copy(name + 4*16,9,"\3ip6\3int\0");
47 - else if (t==DNS_IP6_ARPA)
48 + if (t==DNS_IP6_ARPA)
49 byte_copy(name + 4*16,10,"\3ip6\4arpa\0");
50 else return 0;
51 return 4*16+9+t;
52 diff --git a/tinydns-data.c b/tinydns-data.c
53 index a84c6d1..8b59134 100644
54 --- a/tinydns-data.c
55 +++ b/tinydns-data.c
56 @@ -355,16 +355,12 @@ int main()
57 rr_add(ip6,16);
58 rr_finish(d1);
60 - if (line.s[0] == '6') { /* emit both .ip6.arpa and .ip6.int */
61 + if (line.s[0] == '6') { /* emit .ip6.arpa */
62 dns_name6_domain(d6ptr,ip6,DNS_IP6_ARPA);
63 rr_start(DNS_T_PTR,ttl,ttd,loc);
64 rr_addname(d1);
65 rr_finish(d6ptr);
67 - dns_name6_domain(d6ptr,ip6,DNS_IP6_INT);
68 - rr_start(DNS_T_PTR,ttl,ttd,loc);
69 - rr_addname(d1);
70 - rr_finish(d6ptr);
73 break;