Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Mar 2003 12:08:28 -0800
From:      "Crist J. Clark" <crist.clark@attbi.com>
To:        Wiktor Niesiobedzki <w@evip.pl>
Cc:        freebsd-ipfw@freebsd.org
Subject:   Re: Prioritizing empty TCP ACKs with ipfw?
Message-ID:  <20030318200828.GC74853@blossom.cjclark.org>
In-Reply-To: <20030314224655.GA2616@mail.evip.pl>
References:  <20030314085636.GB64326@galgenberg.net> <el59ycqr.fsf@ID-23066.news.dfncis.de> <20030314224655.GA2616@mail.evip.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 14, 2003 at 11:46:55PM +0100, Wiktor Niesiobedzki wrote:
> On Fri, Mar 14, 2003 at 08:22:36PM +0100, clemens fischer wrote:
> > Ulrich Spoerlein <q@uni.de>:
> > 
> > > I recently read this paper [1] and have to say that I am amazed. Is
> > > this possible with ipfw/2 too? If so, how would one set this up?
> > >
> > > [1] http://www.benzedrine.cx/ackpri.html
> > 
> > if i'm not mistaken, this is available right now with ipfw, see the
> > link to luigis dummynet page in the article you cited.
> > 
> With IPFW2 I use currently "iplen 40" option, is there any *better* way, of
> selecting empty ACK packet?

The amount of data in any given TCP segment is not stored explicitly
in the header. It has to be calculated by,

  segment_data_length = ip_datagram_len - ip_header_len - tcp_offset

Given that an IP header is almost always 20-bytes long and the TCP
header (offset) is usually 20-bytes, your value makes sense... Unless
the TCP header is carrying options, e.g. timestamps.

Doing this calculation would be easy enough, but I think your solution
is probably sufficient. If any change were to be made, I think
changing the 'iplen' option to do "greater-than" and "less-than"
checks, rather than just "equals" would be more useful in
general. That way, you can catch ACKs with no data, but ones that also
have a timestamp option (<53), or sack options (<53, <61, or <68,
depending on how many you want to allow).
-- 
Crist J. Clark                     |     cjclark@alum.mit.edu
                                   |     cjclark@jhu.edu
http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ipfw" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030318200828.GC74853>