All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Brenton <cbrenton@chrisbrenton.org>
To: netfilter <netfilter@lists.netfilter.org>
Subject: Re: ACK,RST getting dropped in the firewall.
Date: Thu, 24 Jun 2004 11:48:45 -0400	[thread overview]
Message-ID: <1088092124.2029.28.camel@grendel> (raw)
In-Reply-To: <200406241454.28088.Antony@Soft-Solutions.co.uk>

On Thu, 2004-06-24 at 09:54, Antony Stone wrote:
>
> > > No harm done though, because the first one has done the job.
> >
> > Actually not quite true as both sides will enter a fin-wait state (RFC
> > 793 page 20) till the second FIN/ACK-ACK exchange takes place.
> 
> Depends what you mean by "done the job".   I meant the phrase in the sense of 
> "no more data is going to pass across the connection".

I *think* this may be the point of confusion. A FIN/ACK only means that
the _sender_ is done transmitting data, To quote from 793:

"The user who CLOSEs may continue to RECEIVE until he is told that the
other side has CLOSED also.  Thus, a program could initiate several
SENDs followed by a CLOSE, and then continue to RECEIVE until signaled
that a RECEIVE failed because the other side has CLOSED."

So just because one side of the connection issues a FIN/ACK, it does not
mean the session is over. The other side of the session may have a lot
more data to transmit so the session can stay active for some additional
period of time. Here in lies out problem. Netfilter is reacting to the
first FIN/ACK and killing off the session before the other end finishes
communicating and issues it's own FIN/ACK. 

The problem *appears to be* (based on my limited testing) in how the
timer is implemented. In an ESTABLISHED state there is a 5 day timer
that gets reset when ever a new packet crosses the firewall. The FIN/ACK
timer seems to be an absolute timer that kicks off at the first FIN/ACK
and continues to count down regardless of whether the session is still
active or not. If it acted more like the ESTABLISHED timer, this problem
would go away.

I can understand wanting a low timer to conserve resources. At the same
time however its killing legitimate RFC compliant sessions. :(

HTH,
Chris






  reply	other threads:[~2004-06-24 15:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-23 11:06 ACK,RST getting dropped in the firewall Manikandan
2004-06-23 11:32 ` Chris Brenton
2004-06-24  9:37   ` Gavin Hamill
2004-06-24 10:44     ` Antony Stone
2004-06-24 13:36       ` Chris Brenton
2004-06-24 13:52         ` Jozsef Kadlecsik
2004-06-24 13:54         ` Antony Stone
2004-06-24 15:48           ` Chris Brenton [this message]
2004-06-24 16:09             ` Antony Stone
2004-06-24 18:29               ` Chris Brenton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1088092124.2029.28.camel@grendel \
    --to=cbrenton@chrisbrenton.org \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.