Bug 593040 - TCP: avoid to send keepalive probes if receiving data
Summary: TCP: avoid to send keepalive probes if receiving data
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.5
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Flavio Leitner
QA Contact: Red Hat Kernel QE team
Depends On:
Blocks: 593052
TreeView+ depends on / blocked
Reported: 2010-05-17 17:22 UTC by Flavio Leitner
Modified: 2018-11-14 19:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-01-13 21:32:23 UTC
Target Upstream Version:

Attachments (Terms of Use)
backported patch (3.09 KB, patch)
2010-05-17 17:44 UTC, Flavio Leitner
no flags Details | Diff

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0017 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.6 kernel security and bug fix update 2011-01-13 10:37:42 UTC

Description Flavio Leitner 2010-05-17 17:22:25 UTC
Description of problem:

Customer has an application that receives a connection and keeps
receiving data without sending anything back, just pure ACKs. After 
some time receiving periodic data from the client, the server starts 
to send keepalive packets.

The upstream commit fixes this problem:

Date: Mon, 26 Apr 2010 18:33:27 +0000 (+0000)
Subject: TCP: avoid to send keepalive probes if receiving data
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdavem%2Fnet-next-2.6.git;a=commitdiff_plain;h=6c37e5de456987f5bc80879afde05aa120784095

TCP: avoid to send keepalive probes if receiving data

RFC 1122 says the following:
  Keep-alive packets MUST only be sent when no data or
  acknowledgement packets have been received for the
  connection within an interval.

The acknowledgement packet is reseting the keepalive
timer but the data packet isn't. This patch fixes it by
checking the timestamp of the last received data packet
too when the keepalive timer expires.

Signed-off-by: Flavio Leitner <fleitner@redhat.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>

Version-Release number of selected component (if applicable):
all - including upstream before the commit above

How reproducible:

Steps to Reproduce:
1. Run the server script on one system
2. Run the client script on another system
3. Watch the traffic dump and the time, even after the server had received
   data packet, it will send a keepalive packet.
Expected results:
No keepalive sent as the data exchanged proves the connection is alive.

Additional info:
Brew build url with the upstream patch backported and applied:

Comment 3 Flavio Leitner 2010-05-17 17:44:53 UTC
Created attachment 414625 [details]
backported patch

Comment 5 RHEL Program Management 2010-05-20 12:44:20 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 7 Jarod Wilson 2010-06-14 18:23:38 UTC
in kernel-2.6.18-203.el5
You can download this test kernel from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.

Comment 12 errata-xmlrpc 2011-01-13 21:32:23 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.