After moving, which went fine, I now finally have some real coding time again. The last week I have been updating and fixing various parts of Snort_inline. The most important change was the update to Snort version 22.214.171.124, which contains security fixes. William also found an issue with the Stream4inline code. The issue was that the memcap that the admin sets to limit the amount of memory used by stream4 wasn’t properly enforced.
Other fixes that are done is that Snort_inline in nfqueue mode now properly honors signals and also no longer needs the libipq library and headers. There are few changes that will be committed soon. One is an issue that clamav can sometimes return an error when parsing malformed file. Until now the spp_clamav preprocessor would issue a FatalError and cause Snort_inline to die. This is obviously not desirable so the patch makes sure that Snort_inline no longer dies and gives the admin an option to either drop or pass traffic that can’t be inspected.
Last but not least there will be a fix to the nfqueue code that appears to solve the ‘stuck packet problem’ we were seeing under heavy load. A number of people are testing my patch currently so if all goes well that will be commited soon as well.
Checking out the latest code is done with the following command:
svn co https://snort-inline.svn.sourceforge.net/svnroot/snort-inline/trunk
Since a short while I have a gigabit setup at home. My laptop has a e1000 Intel NIC, my desktop a Broadcom NIC.While playing with Snort_inline and netpipe-tcp, I noticed something odd. I got tcp packets that had the ‘Don’t Fragment’ option set, but were still bigger than the mtu size of the link. Snort_inline read packets of up to 26kb from the queue, and wireshark and tcpdump were seeing the packets as well. This was only for outgoing packets on the e1000 NIC. The receiving pc saw the packets split up in multiple packets that were honoring the mtu size. This got me thinking that some form of offloading must be taking place and indeed this was the case:
# ethtool -k eth0
Offload parameters for eth0:
tcp segmentation offload: on
It can be disabled by using the following command:
# ethtool -K eth0 tso off
The large packets caused problems in my stream4inline modifications of Stream4. The code can’t handle the case where the packet is bigger than the sliding window size. So I have some work to do 😉
This site is hosted at a server at my home and is connected using my DSL connection. Next weekend I’m moving and the DSL has to be moved as well. Since that usually takes a few weeks here, I had to move the blog (and my mailserver) elsewhere for a while. Luckily Adi Kriegisch provided me with access to a server, so yesterday both my mailserver and weblog were moved. I have no native IPv6 connection there so I’ve disabled IPv6 access for now. Maybe I’ll try to restore it later. As far as I can see everything works, but if you see any problems please let me know! Big thanks to Adi for hosting my site!