Permalink
Browse files

import dnscache 1.00

  • Loading branch information...
D. J. Bernstein authored and abh committed Mar 26, 2000
0 parents commit 3e25c7034aefa96dea7a0fde05aec02afb1f56e4
Showing with 15,196 additions and 0 deletions.
  1. +13 −0 @
  2. +272 −0 CHANGES
  3. +239 −0 FILES
  4. +1,078 −0 Makefile
  5. +7 −0 README
  6. +10 −0 SYSDEPS
  7. +211 −0 TARGETS
  8. +9 −0 TODO
  9. +1 −0 VERSION
  10. +32 −0 alloc.c
  11. +8 −0 alloc.h
  12. +17 −0 alloc_re.c
  13. +41 −0 auto-str.c
  14. +6 −0 auto_home.h
  15. +362 −0 axfr-get.c
  16. +67 −0 axfrdns-conf.c
  17. +344 −0 axfrdns.c
  18. +10 −0 buffer.c
  19. +56 −0 buffer.h
  20. +6 −0 buffer_1.c
  21. +6 −0 buffer_2.c
  22. +16 −0 buffer_copy.c
  23. +67 −0 buffer_get.c
  24. +88 −0 buffer_put.c
  25. +13 −0 byte.h
  26. +20 −0 byte_chr.c
  27. +14 −0 byte_copy.c
  28. +16 −0 byte_cr.c
  29. +16 −0 byte_diff.c
  30. +13 −0 byte_zero.c
  31. +200 −0 cache.c
  32. +11 −0 cache.h
  33. +31 −0 cachetest.c
  34. +13 −0 case.h
  35. +18 −0 case_diffb.c
  36. +17 −0 case_diffs.c
  37. +12 −0 case_lowerb.c
  38. +136 −0 cdb.c
  39. +37 −0 cdb.h
  40. +21 −0 cdb_hash.c
  41. +153 −0 cdb_make.c
  42. +39 −0 cdb_make.h
  43. +10 −0 chkshsgr.c
  44. +18 −0 choose.sh
  45. +3 −0 conf-cc
  46. +4 −0 conf-home
  47. +3 −0 conf-ld
  48. +36 −0 dd.c
  49. +6 −0 dd.h
  50. +10 −0 direntry.h1
  51. +10 −0 direntry.h2
  52. +84 −0 dns.h
  53. +69 −0 dns_dfd.c
  54. +61 −0 dns_domain.c
  55. +35 −0 dns_dtda.c
  56. +75 −0 dns_ip.c
  57. +71 −0 dns_ipq.c
  58. +49 −0 dns_mx.c
  59. +48 −0 dns_name.c
  60. +24 −0 dns_nd.c
  61. +77 −0 dns_packet.c
  62. +62 −0 dns_random.c
  63. +85 −0 dns_rcip.c
  64. +130 −0 dns_rcrw.c
  65. +29 −0 dns_resolve.c
  66. +20 −0 dns_sortip.c
  67. +364 −0 dns_transmit.c
  68. +59 −0 dns_txt.c
  69. +196 −0 dnscache-conf.c
  70. +424 −0 dnscache.c
  71. +214 −0 dnsfilter.c
  72. +40 −0 dnsip.c
  73. +43 −0 dnsipq.c
  74. +56 −0 dnsmx.c
  75. +34 −0 dnsname.c
  76. +98 −0 dnsq.c
  77. +473 −0 dnstrace.c
  78. +33 −0 dnstxt.c
  79. +32 −0 droproot.c
  80. +6 −0 droproot.h
  81. +15 −0 env.c
  82. +8 −0 env.h
  83. +116 −0 error.c
  84. +26 −0 error.h
  85. +269 −0 error_str.c
  86. +6 −0 exit.h
  87. +143 −0 find-systype.sh
  88. +25 −0 fmt.h
  89. +13 −0 fmt_ulong.c
  90. +7 −0 gen_alloc.h
  91. +34 −0 gen_allocdefs.h
  92. +97 −0 generic-conf.c
  93. +20 −0 generic-conf.h
  94. +14 −0 getln.c
  95. +10 −0 getln.h
  96. +24 −0 getln2.c
  97. +1 −0 hasdevtcp.h1
  98. +2 −0 hasdevtcp.h2
  99. +1 −0 hasshsgr.h1
  100. +2 −0 hasshsgr.h2
  101. +43 −0 hier.c
  102. +149 −0 install.c
  103. +108 −0 instcheck.c
  104. +76 −0 iopause.c
  105. +19 −0 iopause.h1
  106. +18 −0 iopause.h2
  107. +9 −0 ip4.h
  108. +18 −0 ip4_fmt.c
  109. +19 −0 ip4_scan.c
  110. +287 −0 log.c
  111. +37 −0 log.h
  112. +7 −0 ndelay.h
  113. +12 −0 ndelay_off.c
  114. +12 −0 ndelay_on.c
  115. +26 −0 okclient.c
  116. +6 −0 okclient.h
  117. +10 −0 open.h
  118. +6 −0 open_read.c
  119. +6 −0 open_trunc.c
  120. +16 −0 openreadclose.c
  121. +8 −0 openreadclose.h
  122. +30 −0 parsetype.c
  123. +6 −0 parsetype.h
  124. +62 −0 pickdns-conf.c
  125. +228 −0 pickdns-data.c
  126. +93 −0 pickdns.c
  127. +89 −0 printpacket.c
  128. +8 −0 printpacket.h
  129. +115 −0 printrecord.c
  130. +9 −0 printrecord.h
  131. +19 −0 prot.c
  132. +7 −0 prot.h
  133. +63 −0 qlog.c
  134. +8 −0 qlog.h
  135. +845 −0 query.c
  136. +27 −0 query.h
  137. +80 −0 random-ip.c
  138. +66 −0 rbldns-conf.c
  139. +126 −0 rbldns-data.c
  140. +114 −0 rbldns.c
  141. +21 −0 readclose.c
  142. +9 −0 readclose.h
  143. +7 −0 readwrite.h
  144. +111 −0 response.c
  145. +24 −0 response.h
  146. +127 −0 roots.c
  147. +8 −0 roots.h
  148. +961 −0 rts.exp
  149. +1 −0 rts.sh
  150. +717 −0 rts.tests
  151. +28 −0 scan.h
  152. +14 −0 scan_ulong.c
  153. +15 −0 seek.h
  154. +7 −0 seek_set.c
  155. +10 −0 select.h1
  156. +11 −0 select.h2
  157. +106 −0 server.c
  158. +51 −0 sgetopt.c
  159. +21 −0 sgetopt.h
  160. +22 −0 socket.h
  161. +21 −0 socket_accept.c
  162. +33 −0 socket_bind.c
  163. +33 −0 socket_conn.c
  164. +10 −0 socket_listen.c
  165. +21 −0 socket_recv.c
  166. +18 −0 socket_send.c
  167. +16 −0 socket_tcp.c
  168. +16 −0 socket_udp.c
  169. +14 −0 str.h
  170. +17 −0 str_chr.c
  171. +15 −0 str_diff.c
  172. +14 −0 str_len.c
  173. +20 −0 str_rchr.c
  174. +13 −0 str_start.c
  175. +29 −0 stralloc.h
  176. +7 −0 stralloc_cat.c
  177. +12 −0 stralloc_catb.c
  178. +8 −0 stralloc_cats.c
  179. +7 −0 stralloc_copy.c
  180. +6 −0 stralloc_eady.c
  181. +29 −0 stralloc_num.c
  182. +11 −0 stralloc_opyb.c
  183. +8 −0 stralloc_opys.c
  184. +5 −0 stralloc_pend.c
  185. +78 −0 strerr.h
  186. +31 −0 strerr_die.c
  187. +12 −0 strerr_sys.c
  188. +65 −0 subgetopt.c
  189. +24 −0 subgetopt.h
  190. +26 −0 tai.h
  191. +6 −0 tai_add.c
  192. +7 −0 tai_now.c
  193. +16 −0 tai_pack.c
  194. +6 −0 tai_sub.c
  195. +6 −0 tai_uint.c
  196. +16 −0 tai_unpack.c
  197. +33 −0 taia.h
  198. +18 −0 taia_add.c
  199. +6 −0 taia_approx.c
  200. +6 −0 taia_frac.c
  201. +12 −0 taia_less.c
  202. +12 −0 taia_now.c
  203. +20 −0 taia_pack.c
  204. +21 −0 taia_sub.c
  205. +6 −0 taia_tai.c
  206. +10 −0 taia_uint.c
  207. +259 −0 tdlookup.c
  208. +28 −0 timeoutread.c
  209. +6 −0 timeoutread.h
  210. +28 −0 timeoutwrite.c
  211. +6 −0 timeoutwrite.h
  212. +94 −0 tinydns-conf.c
  213. +404 −0 tinydns-data.c
  214. +255 −0 tinydns-edit.c
  215. +67 −0 tinydns-get.c
  216. +6 −0 tinydns.c
  217. +7 −0 trycpp.c
  218. +8 −0 trydrent.c
  219. +4 −0 trylsock.c
  220. +18 −0 trypoll.c
  221. +14 −0 tryshsgr.c
  222. +8 −0 trysysel.c
  223. +11 −0 tryulong32.c
  224. +11 −0 tryulong64.c
  225. +11 −0 uint16.h
  226. +13 −0 uint16_pack.c
  227. +23 −0 uint16_unpack.c
  228. +11 −0 uint32.h1
  229. +11 −0 uint32.h2
  230. +21 −0 uint32_pack.c
  231. +31 −0 uint32_unpack.c
  232. +8 −0 uint64.h1
  233. +8 −0 uint64.h2
  234. +24 −0 utime.c
  235. +54 −0 walldns-conf.c
  236. +56 −0 walldns.c
  237. +2 −0 warn-auto.sh
  238. +3 −0 warn-shsgr
  239. +38 −0 x86cpuid.c
13 @
@@ -0,0 +1,13 @@
+198.41.0.4
+128.9.0.107
+192.33.4.12
+128.8.10.90
+192.203.230.10
+192.5.5.241
+192.112.36.4
+128.63.2.53
+192.36.148.17
+198.41.0.10
+193.0.14.129
+198.32.64.12
+202.12.27.33
272 CHANGES
@@ -0,0 +1,272 @@
+19991129
+ version: dnscache 0.50, alpha. not released yet.
+19991223
+ version: dnscache 0.60, alpha.
+19991224
+ internal: dns_sortip() takes length argument.
+ api: dns_ip4() sorts output. currently this means just random.
+ api: added socket_bind4_reuse(). removed reuse from bind4().
+ ui: used bind4_reuse() for port 53, bind4() otherwise.
+ internal: eliminated some unused variables.
+ internal: prototypes in cdb.h, cdbmake.h, cdbmss.h.
+ internal: prototypes in case.h, env.h, fmt.h, scan.h, str.h.
+ internal: prototypes in stralloc.h.
+ internal: prototypes in error.h, strerr.h.
+ internal: prototypes in ndelay.h, open.h, seek.h.
+ internal: prototypes in sgetopt.h, subgetopt.h.
+ internal: prototypes in tai.h, taia.h.
+ internal: added some missing declarations.
+ bug: query.c checked void response_finishanswer() return code.
+ impact: cached responses were dropped on systems that
+ didn't follow the traditional C return behavior. fix:
+ obvious. tnx Giles Lean.
+ internal: switched from taia_addsec() to taia_uint().
+ api: switched to uint16 for socket_* port numbers.
+ internal: integrated uint16_pack() and friends.
+ ui: dnscache allows (recursive) queries from port 53.
+ ui: dnscache has 10-second idle timer on TCP read/write.
+ ui: dnscache limits itself to 20 concurrent TCP connections.
+ internal: moved dns_domain_fromdot() to separate file.
+ ui: supported \X, \1, \12, \123 in dns_domain_fromdot().
+ ui: supported \123 in dns_domain_todot_append().
+ version: dnscache 0.61, alpha.
+19991230
+ api: added dns_ip4_qualify().
+ api: added dns_resolvconfrewrite().
+ ui: added dnsipq.
+ api: dns_ip4() checks for (strings of) IP addresses.
+20000106
+ port: Solaris needs /dev/udp, not just /dev/tcp. impact:
+ dnscache and tinydns would stop immediately under
+ Solaris. fix: create /dev/udp in configure; and have
+ tinydns create socket before chroot. tnx Louis Theran.
+ internal: moved dns_name4_domain() to dns_nd.c.
+ ui: tinydns no longer excludes screwy queries from its log.
+ internal: moved respond() to tdlookup.c under new name.
+ ui: added tinydns-get.
+ ui: rewrote tinydns-data for new data format.
+ internal: expanded rts to cover tinydns-data using tinydns-get.
+20000107
+ ui: tinydns-data allows arbitrary case in domain names.
+ ui: dnscache supports preconfigured servers for non-root
+ domains.
+ ui: dnscache uses textual addresses for preconfigured servers.
+20000108
+ ui: tinydns-data excludes the additional and authority sections
+ if doing so helps meet the 512-byte UDP limit.
+ version: dnscache 0.70, beta.
+20000114
+ internal: in log.c, ulong() now prints a uint64.
+ internal: added cache_motion, query_count, log_stats.
+ ui: dnscache now prints queries/motion stats after typical
+ response packets.
+20000115
+ internal: added droproot.c. used in tinydns and dnscache.
+ internal: moved tinydns log() to qlog.c under new name.
+ ui: added walldns, configure-wd.
+ ui: configure-td now creates an empty root/data.
+ ui: added tinydns-edit.
+ ui: configure-td now sets up root/add-{ns,childns,host,mx}.
+20000116
+ ui: renamed configure* as *-conf.
+ ui: added axfrdns, axfrdns-conf.
+ ui: added axfr-get.
+ ui: dnscache-conf 10.* or 192.168.* now sets IPSEND=0.0.0.0.
+20000117
+ ui: added pickdns, pickdns-conf, pickdns-data.
+ version: dnscache 0.75, beta.
+20000118
+ internal: address* -> address_* in pickdns-data.c.
+ internal: start writing cdb earlier in pickdns-data.c.
+ internal: keep track of namelen in pickdns-data.c.
+ ui: added client-location variability to pickdns, pickdns-data.
+ ui: qlog logs short packets.
+ ui: qlog logs header if RD or other unusual bits are set.
+ ui: qlog logs non-Internet classes.
+ api: dns_domain_todot_append() -> dns_domain_todot_cat().
+ ui: axfr-get prints A records more nicely. tnx Russ Nelson.
+ ui: tinydns, pickdns, and walldns respond REFUSED to multiple
+ queries, strange classes, and strange header bits.
+ pickdns and walldns also respond REFUSED to unrecognized
+ domain names.
+20000120
+ ui: dns_resolvconfip() and dns_resolvconfrewrite() reread after
+ 10 minutes or 10000 uses.
+ ui: dns_resolvconfrewrite() treats "domain" like "search".
+ ui: dns_resolvconfrewrite() supports $LOCALDOMAIN.
+ ui: dns_resolvconfrewrite() supports gethostname().
+ api: dns_ip4_qualify() -> dns_ip4_qualify_rules(). new function
+ under the old name uses dns_resolvconfrewrite().
+ internal: cleaned up log.h.
+20000121
+ port: the gcc 2.95.2 -O2 optimizer can destroy parameters in a
+ function that calls another function with a long long
+ argument. impact: gcc 2.95.2 kills dnscache in
+ log_query(). fix: pass log_stats() inputs by reference,
+ and pass uint64's through a variable inside log.c.
+ internal: introduced x_* in axfr-get.
+ internal: more format verification in axfr-get.
+ ui: minimal Z support in tinydns-data.
+ ui: axfr-get prints Z lines.
+ ui: juggled axfr-get to support BIND 8's many-answers option.
+ ui: axfr-get prints common characters readably rather than in
+ octal. tnx Karsten Thygesen.
+ ui: install copies VERSION into .../etc.
+20000122
+ ui: dns_domain_todot_cat() now lowercases everything.
+ internal: split printrecord.c out of tinydns-get.
+ ui: added dnstrace.
+20000123
+ version: dnscache 0.76, beta.
+20000124
+ port: Solaris needs socket libraries for dnstrace. impact:
+ couldn't compile under Solaris. fix: use socket.lib.
+ tnx Karsten Thygesen.
+20000126
+ ui: dns_resolvconfip() supports $DNSCACHEIP.
+ ui: changed tinydns-get arg order.
+ internal: split printpacket.c out of tinydns-get.
+ ui: added dnsquery.
+ internal: merged case.a, fs.a, str.a, uint.a, ip4.a into byte.a.
+ internal: merged strerr.a into buffer.a.
+ internal: merged stralloc.a, getln.a into alloc.a.
+ internal: merged error.a, open.a, seek.a, ndelay.a, socket.a
+ into unix.a.
+ internal: used catulong in axfr-get.c.
+ ui: packet-parsing errors produce error_proto.
+ ui: axfr-get goes out of its way to reject wildcards.
+ internal: introduced generic-conf.c.
+ internal: upgraded timeoutread and timeoutwrite to iopause.
+20000127
+ ui: revamped details of the log formats.
+ ui: full Z support in tinydns-data.
+ ui: axfr-get accepts authority records and additional records.
+ ui: axfrdns tries to imitate BIND's handling of glue.
+ internal: expanded rts to try out the servers and *-conf.
+ ui: added rbldns.
+20000128
+ ui: increased MAXNS to 16 in query.h.
+20000129
+ version: DNScache 0.80, beta.
+20000205
+ ui: tinydns-data supports ^, for the benefit of people stuck
+ behind reverse CNAMEs. tnx Petr Novotny.
+20000206
+ ui: rbldns supports $.
+ ui: tinydns-data supports C. CNAME is overridden by NS; CNAME
+ overrides other records; no multiple CNAMEs.
+ ui: axfr-get supports C.
+ ui: axfr-get no longer rejects wildcards, except for NS.
+ internal: eliminated flagempty from tinydns-data.
+ internal: cleaned up delegation/NXDOMAIN loops in tinydns-data.
+ internal: reorganized packet_start interface in tinydns-data.
+ ui: tinydns-data supports BIND-style wildcards, except for NS.
+ version: DNScache 0.81, beta.
+20000207
+ ui: renamed dnsquery as dnsq, to eliminate name conflict with
+ Beecher dnsquery program. tnx Anand Buddhdev.
+20000208
+ ui: tinydns-edit supports add alias.
+ ui: tinydns-conf sets up root/add-alias.
+20000209
+ ui: dnscache-conf now sets IPSEND=0.0.0.0 in all cases.
+ ui: dnsq and dnstrace allow server names.
+ ui: dnsq and dnstrace allow type names.
+20000210
+ internal: response_tc() reduces len, simplifying udprespond().
+ ui: response_tc() now truncates immediately after query. this
+ should work around the Squid parsing bug reported by
+ Stuart Henderson.
+20000211
+ ui: tinydns-get allows type names.
+ ui: tinydns-data prints query name for >512 error. tnx Uwe Ohse.
+ version: DNScache 0.82, beta.
+20000212
+ ui: dns_transmit starts with loop 1 for recursive queries.
+ ui: dnscache tries to allocate 128K of incoming UDP buffer
+ space. tnx Jeremy Hansen.
+20000213
+ ui: tinydns tries to allocate 64K of incoming UDP buffer space.
+ internal: renamed response_*answer as response_r*.
+ internal: expanded response_rfinish to allow au and ar.
+ internal: expanded response_rstart to allow any ttl.
+ internal: rewrote tinydns-data, tinydns, tinydns-get, axfrdns
+ for compact new data.cdb format. a few ui effects: empty
+ nodes produce NXDOMAIN; wildcards affect empty nodes.
+ ui: response_addname() tries more extensive compression.
+20000215
+ ui: tinydns-edit takes fn arguments. tnx Jason R. Mastaler.
+20000218
+ internal: upgraded to new cdb library.
+ internal: added globalip().
+ ui: dnscache assigns IP addresses to dotted-decimal domain
+ names in canonical form.
+ internal: merged handling of C and ^ in tinydns-data.
+ port: FreeBSD 3.4-RELEASE poll() doesn't think that regular
+ files are readable. impact: under FreeBSD 3.4-RELEASE,
+ dnsfilter hangs waiting to read from regular files. tnx
+ Kenji Rikitake. fix: check for this bug in trypoll.c.
+20000219
+ ui: tinydns-data supports time-to-die.
+ ui: changed home directory from /usr/local/dnscache to
+ /usr/local; moved @ from home/etc to home/etc/dnscache.
+ internal: reorganized response.c.
+20000220
+ ui: tinydns-data allows omitted numeric fields in Z lines. tnx
+ Timothy L. Mayo.
+ version: DNScache 0.85, beta.
+20000222
+ ui: dns_transmit_get() pauses after server failure, if udploop
+ is 2.
+ internal: sped up name handling in response.c.
+20000223
+ ui: dnscache ignores some garbage in queries: AA, !RD, RA, Z,
+ RCODE, AN, AU, AR. (note that responses still say RD.)
+ this allows bogus queries from Ultrix versions of BIND.
+ internal: split dd.c out of query.c.
+ internal: split server.c out of tinydns.
+ internal: rewrote walldns, pickdns, rbldns to use server.c.
+ ui: server.c allows some garbage in queries: RA, Z, RCODE, AN,
+ AU, AR.
+ ui: axfrdns logs packets.
+ ui: walldns supports dotted-decimal IP addresses.
+20000224
+ ui: revamped qlog, again.
+ ui: better error message in dnscache-conf.c. tnx Chris Johnson.
+20000225
+ version: DNScache 0.90, gamma.
+20000226
+ internal: dnscache-conf sets up dnscache/run to avoid env. tnx
+ Chris Cappuccio.
+20000227
+ ui: tinydns-data uses server name instead of a.ns.domain for
+ automatic primary in SOA. tnx Frank Tegtmeyer.
+20000228
+ bug: axfrdns doesn't set aa bit in responses. impact: named-xfer
+ refuses to do zone transfers from axfrdns. fix: set aa
+ bit. tnx Peter Hunter.
+ ui: server.c now accepts packets from low ports. sigh.
+20000229
+ version: DNScache 0.91, gamma.
+20000307
+ internal: switched from slurp to openreadclose.
+20000308
+ ui: dns_transmit_get() pauses after recv() failure (such as
+ connection-refused), if udploop is 2.
+ ui: tinydns-data uses refresh 16384, retry 2048, expire 1048576.
+ tnx Frank Tegtmeyer.
+ version: DNScache 0.92, gamma.
+20000314
+ portability problem: the poll() emulation in RedHat 5.1 doesn't
+ clear revents when select() returns 0. tnx Petr Novotny.
+ impact: dns_transmit_get() never times out;
+ dns_resolve() busy-loops. fix: clear revents before
+ poll().
+20000315
+ ui: axfr-get grabs zones when serials drop. tnx Frank Tegtmeyer.
+ version: DNScache 0.93, gamma.
+20000323
+ ui: dns_rcip() accepts 0.0.0.0 in /etc/resolv.conf as 127.0.0.1.
+ tnx Chris Saia.
+20000325
+ version: DNScache 1.00.
Oops, something went wrong.

0 comments on commit 3e25c70

Please sign in to comment.