Sunday, May 10, 2009

Deadwood 2.3 and testing partial TCP sends

I tried to the tests that test TCP buffering for Deadwood 2.4 in Deadwood 2.3 and can't get Deadwood 2.3 to, at least over the loopback interface, be in a situation where send() sends less data over the TCP pipe than the amount of data we just got from a recv().

For whatever reason, the recv() call receives less bytes if doing a send() over the localhost interface would only be able to send fewer bytes. This may be a Linux kernel bug, or some side effect of doing everything over the localhost interface.

Bottom line, I can't trigger a partial send() in Deadwood 2.3. Since I still haven't come up with a testcase to test partial sends, I can't fix the issues Deadwood 2.3 may or may not have with partial sends.

It looks like partial sends work without problem in Deadwood 2.4, since the testcases here actually triggered partial sends which I was able to test and get to work.

Since DNS-over-TCP is very very rare, this issue isn't a priority right now.

So, without further ado, here's the current Deadwood 2.4 TODO:
  • Make it possible to have upstream_servers for hostnames besides the root hostname (".").
  • Then I should take MaraDNS' DNS compression and decompression code and port it to Deadwood's codebase.
  • Next, I can think about TTL aging and resource record rotation.
  • Then I can concentrate on real recursion.
- Sam