Open Source Contributions and Miscellaneous Code

Below are some free software contributions I have made. You may be interested in them --  They are classic "itches scratched". Some of the contributions are bug fixes, some are minor features, some are small utilities, and so on. Perhaps you share the same itch and can benefit from them.

  • pcap-ip-replay - A tiny utility that takes a stored packet capture file and retransmits all of the contents back onto the ethernet as fast as it can. Very useful for evaluating changes to the local networking stack.
  • A patch to gnu libc that fixes a problem with the DNS resolver where even short CNAME responses cause redundant requests to happen on 64 bit platforms.
  • An netlink NETLINK_ROUTE example of event driven monitoring of IP address changes under Linux.
  • Linux Kernel TCP_DEFER_ACCEPT option changes - This is a neat socket option that lets a server application change the behavior of accept() so that no new connections come through accept() unless there is data ready to read on them. This avoids a typical pattern where accept() happens and a subsequent read() forces a context switch. For something like HTTP, where the client always sends first, it is a simple performance win. Unfortunately the implementation ties itself to SYN-RECV handling in the kernel which leads to problems of timeouts being significantly rounded up, un-necessary retransmits of the SYN-RECV packet, and unclean shutdown of an established connection on the error path. This series of patches (here, here, and here) addresses those issues. They are anticipated to be part of Linux Kernel 2.6.26
  • Netstat performance optimization - The venerable netstat utility is really slow in the presence of a large number of TCP connections. You can easily see this in the slow performance of cat /proc/net/tcp. The ss utility is much quicker because it uses the inet_diag facility of netlink instead of /proc/net/tcp. This patch allows netstat to do the same. Tested with 25,000 open connections - the patched netstat is 100x faster than the original one.

  • PCap DNS Latency Calculator - Somecrazy c++ code to take a server side libpcap (i.e. tcpdump, ethereal,wireshark, etc..) capture file, isolate DNS trnsactions, and calculatethe latency between the request and reply. Similar to the TCP RTTHandshake Calculator below.

  • Evolution Plugin for OneKeypress Folder Moving - I like to use an imap folder to train myspam filter off of instead of my workstation. That is because I readmy mail from a number of different hosts, and it therefore makes senseto do the spam training and filtering at the imap server leveltoo. Evolution normally makes you use the mouse to file a message in adifferent folder, and I loathe the mouse when reading mail. Thislittle plugin lets you file the current message into a designatedfolder with the press of Ctrl F12. Interesting experience doing theplugin - it is a very concise 113 lines of xml and C (which wasinsanely easy!), unfortunately it comes in a 4MB tgz file in order toaccomodate the plugin build system!

  • PCap TCP RTT Handshake Calculator- Some crazy c++ code to take a server side libpcap (i.e. tcpdump, ethereal,wireshark, etc..) capture file, isolate connections being made to aparticular server and port, and calculate the handshake latencybetween the server's syn-ack and when the peer's ack corresponding ackarrives. Good for characterizing the latency characteristics of aserver's users.

  • Fix for GAIM 1.5.0 malfored HTTPRequest - The GAIM gaim_url_fetch() function used by some pluginscan make illegal HTTP/1.0 requests. The requests are formed withabsolute URIs which is ok for HTTP/1.1 or HTTP/1.0 when talking to aproxy server, but is not legal for HTTP/1.0 when sending to an originserver.. see HTTP 1945 section 5.1.2. There is a little more info inthe officialbug entry.

  • 2.6.12-rc4 Linux KernelOOPS fix for reading /sys/module/intelfb/parameters/mode. Theintelfb marked a parameter __initdata that was also exported viasysfs, leading to the oops. The bug is routine - tracking it back tothis from a randomOOPS when trying to migrate data to a new harddrivewas a twisty path. It was included in the main kernel as of 2.6.12-rc6.

  • IPv6link-local suppression when autoconf off patch for 2.6 kernels -When the autoconf sysctl is turned off, this patch prevents anethernet interface from getting an IPV6 link local address justbecause it is turned up with an IPv4 address. It lets you easily run a V4system on a box with a V6 enabled kernel by just adjusting asysctl. Try (and get stymied by) dig ns without it. More infohere.

  • USB QuickCam Driver - A port ofthis driver (not originally my work) to linux-2.6.12-rc2. I use it fordevice 046D:0870.

  • DCCP Patches for Linux - A set of kernelpatches for a research implemention of DCCP (Datagram CongestionControl Protocol) under linux 2.4.18. Massively out of date - it wascurrent in May of 2002. Useful as historic reference only.

  • dhcpinform - A little utility to see whatdhcp options are being offered on your network. It does not interferewith, nor require, any existing leases.

  • Patch to make Mozillause WPAD for proxy autodiscovery, at least the dhcp aspect ofWPAD. It requires the dhcpinform program above.

  • An e-mail to bugzilla HTTP gateway- place this program in a procmail address at any address youlike. When bugzilla sends you a "new comment" notificationon a bug you are tracking, you can simply reply to that message(actually sending it to the location you've installed the gateway at)with your own comments. Your comments will be appended to the bugwithout ever having to load up the web version of bugzilla. This doesnot require administrative access to the bugzilla db toinstall.

  • Some very old (circa 1999) patches to implement HTTP Transfer Encoding in Squid. These patchesare no longer maintained.