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.

  • 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 - Some crazy c++ code to take a server side libpcap (i.e. tcpdump, ethereal, wireshark, etc..) capture file, isolate DNS trnsactions, and calculate the latency between the request and reply. Similar to the TCP RTT Handshake Calculator below.

  • Evolution Plugin for One Keypress Folder Moving - I like to use an imap folder to train my spam filter off of instead of my workstation. That is because I read my mail from a number of different hosts, and it therefore makes sense to do the spam training and filtering at the imap server level too. Evolution normally makes you use the mouse to file a message in a different folder, and I loathe the mouse when reading mail. This little plugin lets you file the current message into a designated folder with the press of Ctrl F12. Interesting experience doing the plugin - it is a very concise 113 lines of xml and C (which was insanely easy!), unfortunately it comes in a 4MB tgz file in order to accomodate 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 a particular server and port, and calculate the handshake latency between the server's syn-ack and when the peer's ack corresponding ack arrives. Good for characterizing the latency characteristics of a server's users.

  • Fix for GAIM 1.5.0 malfored HTTP Request - The GAIM gaim_url_fetch() function used by some plugins can make illegal HTTP/1.0 requests. The requests are formed with absolute URIs which is ok for HTTP/1.1 or HTTP/1.0 when talking to a proxy server, but is not legal for HTTP/1.0 when sending to an origin server.. see HTTP 1945 section 5.1.2. There is a little more info in the official bug entry.

  • 2.6.12-rc4 Linux Kernel OOPS fix for reading /sys/module/intelfb/parameters/mode. The intelfb marked a parameter __initdata that was also exported via sysfs, leading to the oops. The bug is routine - tracking it back to this from a random OOPS when trying to migrate data to a new harddrive was a twisty path. It was included in the main kernel as of 2.6.12-rc6.

  • IPv6 link-local suppression when autoconf off patch for 2.6 kernels - When the autoconf sysctl is turned off, this patch prevents an ethernet interface from getting an IPV6 link local address just because it is turned up with an IPv4 address. It lets you easily run a V4 system on a box with a V6 enabled kernel by just adjusting a sysctl. Try (and get stymied by) dig ns example.com @b.gtld-servers.net. without it. More info here.

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

  • DCCP Patches for Linux - A set of kernel patches for a research implemention of DCCP (Datagram Congestion Control Protocol) under linux 2.4.18. Massively out of date - it was current in May of 2002. Useful as historic reference only.

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

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

  • An e-mail to bugzilla HTTP gateway - place this program in a procmail address at any address you like. When bugzilla sends you a "new comment" notification on 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 bug without ever having to load up the web version of bugzilla. This does not require administrative access to the bugzilla db to install.

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