This is a debugged version of Cy's patch for ipfilter support
that I have tested on a virtual machine.
It also merges in a couple of small changes that Christos made to the NetBSD version
of the file. A few long lines were wrapped. I also squashed some trailing whitespace.