Tuesday, June 17, 2008

Deadwood bugs to fix

OK, while I'm still on break from MaraDNS, using Deadwood for the last day or so has popped up a number of bugs:
  • The Google bug. Google.com's DNS reply is in the form "Cache for one day: Google.com is a CNAME for www.l.google.com; Cache for one hour: www.l.google.com has the ip 192.168.1.55" Deadwood 2 only looks at the first TTL for a DNS packet and use that to determine how long to cache a reply; Deadwood 2 should look at the first 2 (or first N) TTLs and cache the entire reply for the minimum TTL Deadwood sees (right now Deadwood 2 caches Google.com for one day when it really should only cache it for one hour)
  • "Resurrections" (being able to use expired entries when it's impossible to contact an upstream server) are broken.
  • There are a number of '-Wall' warnings when compiling it with GCC 4 with '-O3' or in MinGW's gcc compiler.
  • A keyboard interrupt signal should be caught, writing the cache to disk when stopped from the keyboard.
So, Deadwood is a little buggy. But no show stoppers. My plan right now is to not touch the code (except by using it) until mid-July, then start work on cleaning up Deadwood.