PERFORCE change 133007 for review

Andre Oppermann andre at freebsd.org
Thu Jan 10 18:16:36 PST 2008


Andre Oppermann wrote:
> http://perforce.freebsd.org/chv.cgi?CH=133007
> 
> Change 133007 by andre at andre_flirtbox on 2008/01/11 01:47:04
> 
> 	Initial branch and import of new TCP reassembly queue.
> 	
> 	It's primarily a code dump.  It compiles, doesn't crash and
> 	almost works as advertized.  Finish will come tomorrow.
> 	
> 	Description is at the top of the file.  Lots of comments
> 	inline.
> 	
> 	It seems TAILQ_LAST() doesn't work as described in its
> 	man page.  Won't return NULL when queue is empty but instead
> 	crashes on NULL pointer dereferencing.  I can't really really
> 	believe I'm the first one to trip over this.  Must have done
> 	something wrong.
> 
> Affected files ...

Damn, didn't know I'd have to do a p4 submit to actually create the
branch.  Now my changes are already mixed into the branch changeset.

Modified files are:

  netinet/tcp_reass.c
  netinet/tcp_input.c
  netinet/tcp_subr.c
  netinet/tcp_var.h
  netinet/tcp_usrreq.c

  sys/queue.h

  netinet/ip_fw.h
  netinet/ip_fw2.h
  netinet/src-usr-sbin-ipfw-ipfw2.c.diff

The latter is a new function to ipfw that truncates tcp segments.
Currently it only truncates from the tail and doesn't update the
checksum.  That doesn't matter for packets that go to a local socket
but won't work for packets transiting through the box.  Truncation
from the head is planned too.  Already now it makes a good tool for
testing of the reassembly queue, SACK and other code that must deal
with weird segments.  Testing with truncated segments exercises much
more code than simply dropping packets.

Now it's already 3am here and I'm very tired.  More code and fixes
tomorrow.

-- 
Andre


More information about the p4-projects mailing list