--- /dev/null
+diff -c djbdns-1.05-dist/rbldns-data.c djbdns-1.05/rbldns-data.c
+*** djbdns-1.05-dist/rbldns-data.c Sun Feb 11 16:11:45 2001
+--- djbdns-1.05/rbldns-data.c Sat May 18 20:04:33 2002
+***************
+*** 89,94 ****
+--- 89,103 ----
+ if (cdb_make_add(&cdb,"",0,tmp.s,tmp.len) == -1)
+ die_datatmp();
+ break;
++ case '!': /* root entry */
++ j = byte_chr(line.s + 1,line.len - 1,':');
++ if (j >= line.len - 1) syntaxerror(": missing colon");
++ if (ip4_scan(line.s + 1,ip) != j) syntaxerror(": malformed IP address");
++ if (!stralloc_copyb(&tmp,ip,4)) nomem();
++ if (!stralloc_catb(&tmp,line.s + j + 2,line.len - j - 2)) nomem();
++ if (cdb_make_add(&cdb,"R",1,tmp.s,tmp.len) == -1)
++ die_datatmp();
++ break;
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ if (!stralloc_0(&line)) nomem();
+
+*** djbdns-1.05-dist/rbldns.c Sun Feb 11 16:11:45 2001
+--- djbdns-1.05/rbldns.c Sat May 18 20:20:33 2002
+***************
+*** 33,39 ****
+ if (byte_equal(qtype,2,DNS_T_ANY)) flaga = flagtxt = 1;
+ if (!flaga && !flagtxt) goto REFUSE;
+
+! if (dd(q,base,reverseip) != 4) goto REFUSE;
+ uint32_unpack(reverseip,&ipnum);
+ uint32_pack_big(ip,ipnum);
+
+--- 33,51 ----
+ if (byte_equal(qtype,2,DNS_T_ANY)) flaga = flagtxt = 1;
+ if (!flaga && !flagtxt) goto REFUSE;
+
+! i = dd(q,base,reverseip);
+! if(i == 0) { /* root entry */
+! r = cdb_find(&c,"R",1);
+! if (r == -1) return 0;
+! if (r && ((dlen = cdb_datalen(&c)) >= 4)) {
+! if (dlen > 100) dlen = 100;
+! if (cdb_read(&c,data,dlen,cdb_datapos(&c)) == -1) return 0;
+! }
+! else {
+! goto REFUSE;
+! }
+! } else {
+! if (i != 4) goto REFUSE;
+ uint32_unpack(reverseip,&ipnum);
+ uint32_pack_big(ip,ipnum);
+
+***************
+*** 63,69 ****
+ --dlen;
+ dlen += ip4_fmt(data + dlen,ip);
+ }
+!
+ if (flaga) {
+ if (!response_rstart(q,DNS_T_A,2048)) return 0;
+ if (!response_addbytes(data,4)) return 0;
+--- 75,81 ----
+ --dlen;
+ dlen += ip4_fmt(data + dlen,ip);
+ }
+! }
+ if (flaga) {
+ if (!response_rstart(q,DNS_T_A,2048)) return 0;
+ if (!response_addbytes(data,4)) return 0;
Summary(pl): DJB DNS
Name: djbdns
Version: 1.05
-Release: 14
+Release: 15
License: http://cr.yp.to/distributors.html (free to use)
Group: Networking/Daemons
Source0: http://cr.yp.to/djbdns/%{name}-%{version}.tar.gz
Patch3: http://iksz.hu/package/djbdns-conf/djbdns-1.05-multi_tinydns_data.patch
Patch4: %{name}-srv.patch
Patch5: %{name}-glibc.patch
+Patch6: %{name}-rbldns_a.patch
URL: http://cr.yp.to/djbdns.html
BuildRequires: rpm-perlprov
Requires(pre): /usr/bin/getgid
%patch3 -p1
%patch4 -p1
%patch5
+%patch6 -p1
cd doc
ln -s merge/djbdns/* .