1 diff -c djbdns-1.05-dist/rbldns-data.c djbdns-1.05/rbldns-data.c
2 *** djbdns-1.05-dist/rbldns-data.c Sun Feb 11 16:11:45 2001
3 --- djbdns-1.05/rbldns-data.c Sat May 18 20:04:33 2002
7 if (cdb_make_add(&cdb,"",0,tmp.s,tmp.len) == -1)
10 + case '!': /* root entry */
11 + j = byte_chr(line.s + 1,line.len - 1,':');
12 + if (j >= line.len - 1) syntaxerror(": missing colon");
13 + if (ip4_scan(line.s + 1,ip) != j) syntaxerror(": malformed IP address");
14 + if (!stralloc_copyb(&tmp,ip,4)) nomem();
15 + if (!stralloc_catb(&tmp,line.s + j + 2,line.len - j - 2)) nomem();
16 + if (cdb_make_add(&cdb,"R",1,tmp.s,tmp.len) == -1)
19 case '0': case '1': case '2': case '3': case '4':
20 case '5': case '6': case '7': case '8': case '9':
21 if (!stralloc_0(&line)) nomem();
23 *** djbdns-1.05-dist/rbldns.c Sun Feb 11 16:11:45 2001
24 --- djbdns-1.05/rbldns.c Sat May 18 20:20:33 2002
27 if (byte_equal(qtype,2,DNS_T_ANY)) flaga = flagtxt = 1;
28 if (!flaga && !flagtxt) goto REFUSE;
30 ! if (dd(q,base,reverseip) != 4) goto REFUSE;
31 uint32_unpack(reverseip,&ipnum);
32 uint32_pack_big(ip,ipnum);
35 if (byte_equal(qtype,2,DNS_T_ANY)) flaga = flagtxt = 1;
36 if (!flaga && !flagtxt) goto REFUSE;
38 ! i = dd(q,base,reverseip);
39 ! if(i == 0) { /* root entry */
40 ! r = cdb_find(&c,"R",1);
41 ! if (r == -1) return 0;
42 ! if (r && ((dlen = cdb_datalen(&c)) >= 4)) {
43 ! if (dlen > 100) dlen = 100;
44 ! if (cdb_read(&c,data,dlen,cdb_datapos(&c)) == -1) return 0;
50 ! if (i != 4) goto REFUSE;
51 uint32_unpack(reverseip,&ipnum);
52 uint32_pack_big(ip,ipnum);
57 dlen += ip4_fmt(data + dlen,ip);
61 if (!response_rstart(q,DNS_T_A,2048)) return 0;
62 if (!response_addbytes(data,4)) return 0;
65 dlen += ip4_fmt(data + dlen,ip);
69 if (!response_rstart(q,DNS_T_A,2048)) return 0;
70 if (!response_addbytes(data,4)) return 0;