[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1410887041.7106.205.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Tue, 16 Sep 2014 10:04:01 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Neal Cardwell <ncardwell@...gle.com>
Cc: Yuchung Cheng <ycheng@...gle.com>,
Andrey Dmitrov <andrey.dmitrov@...etlabs.ru>,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
netdev <netdev@...r.kernel.org>,
"Alexandra N. Kossovsky" <Alexandra.Kossovsky@...etlabs.ru>,
Konstantin Ushakov <kostik@...etlabs.ru>
Subject: Re: TCP connection will hang in FIN_WAIT1 after closing if zero
window is advertised
On Tue, 2014-09-16 at 12:31 -0400, Neal Cardwell wrote:
> On Tue, Sep 16, 2014 at 11:11 AM, Yuchung Cheng <ycheng@...gle.com> wrote:
> > On Tue, Sep 16, 2014 at 6:09 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> >> Normally SO_LINGER could be used, or TCP_USER_TIMEOUT. This requires a
> >> system call before doing the close().
> >>
> >> 1) TCP_USER_TIMEOUT would be the fit for this, but its current
> >> implementation do not take care of the probes sent, even in FIN_WAIT
> >> state when in this zero window mode. A patch would be needed.
> > Yes that's what I meant. I am proposing we should patch
> > TCP_USER_TIMEOUT to do this.
>
> We should probably be careful here. It would be a non-trivial change
> in semantics to have TCP_USER_TIMEOUT solve this issue.
>
> TCP_USER_TIMEOUT, in both the man page, the RFC, and the existing
> code, is about a user-specific limit on the maximum amount of time the
> TCP stack will attempt to transmit a single packet. (For example, the
> man page: "specifies the maximum amount of time in milliseconds that
> transmitted data may remain unacknowledged before TCP will forcibly
> close the corresponding connection"). Any existing apps that are
> setting TCP_USER_TIMEOUT are probably setting it to something in the
> range of seconds to a few minutes, and may reasonably expect their
> orphaned connections to last minutes to hours, as long as they are
> making progress (each of the packets is ACKed in the
> seconds-to-minutes range).
>
> By contrast, AFAICT what we are talking about here for these
> ZWP-forever/tarpit scenarios is to be able to cap the maximum overall
> lifetime of an orphan connection. That's a different parameter, and
> folks might want to set it in the minutes-to-hours range.
Right, but TCP_USER_TIMEOUT should be improved nevertheless ?
Then, we might add support for another safety mechanism, but the bulk
load of TARPIT attacks would be already handled.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists