I have spent all morning combining the UDP and TCP code in to a single combined daemon. We now have two lists of pending connections: Pending UDP connections, which are handled by the code that can cache UDP DNS packets, and pending TCP connections, handled by the far simpler forwarding-only DNS-over-TCP code.
This was easier than I thought it would be; I just had to add two more dwood2rc parameters, and cut-and-paste code from DwTcpSocket.c to DwSocket.c. The effort I have gone to conform to a coding style that keeps the code easy to maintain is truly paying off.
I have also updated the documentation and the SQA tests (but haven't run a SQA test battery). I have only run this code in CentOS 5, and haven't tested it in Windows.
Since I've removed one daemon (DwTcp/DeadwoodTCP) and have only one daemon (service) handle both UDP and TCP now, I will next revert DwWinSvc.c (the code that handles making Deadwood a Windows service) back to its older (2.2.01) form when it only handled one service. I appreciate Marko Njezic contributing code to give the Windows version support for two services, but this code actually is only needed in the 2.3 branch of Deadwood.
I will maintain the 2.3 branch for the foreseeable future because, among other reasons, the way DNS-over-TCP is handled in this code allows the TCP daemon/service to be a general-purpose TCP load balancer.
Starting tomorrow, I am going to give daily snapshots a new naming scheme. Instead of being deadwood-Q-YYYYMMDD, they will now be in the form deadwood-Q-YYYYMMDD-N, with N being a number starting at 1. This will allow me to issue multiple Deadwood snapshots a day.
In addition, I have had a policy of only posting one new blog here a day. Starting tomorrow, this policy is no longer in effect, and I will sometimes post multiple blog entries in a single day. These two changes will allow me to post multiple Deadwood snapshots a day, which should help accelerate Deadwood development. My goal is to have full recursion in Deadwood by the end of the year, and release MaraDNS 2.0.
This code can be looked at over at maradns.org/deadwood/snap.