Bug 593052 - TCP: avoid to send keepalive probes if receiving data
TCP: avoid to send keepalive probes if receiving data
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
All Linux
medium Severity medium
: rc
: ---
Assigned To: Flavio Leitner
Network QE
:
Depends On: 593040
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-17 13:57 EDT by Flavio Leitner
Modified: 2010-11-11 11:04 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 11:04:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
backported patch (3.08 KB, patch)
2010-05-17 14:08 EDT, Flavio Leitner
no flags Details | Diff

  None (edit)
Description Flavio Leitner 2010-05-17 13:57:54 EDT
+++ This bug was initially created as a clone of Bug #593040 +++
>>> The same as for Red Hat Enterprise Linux 5.6 but for 6.0. <<<


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:
Always

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.
Comment 1 RHEL Product and Program Management 2010-05-17 14:05:28 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 2 Flavio Leitner 2010-05-17 14:08:13 EDT
Created attachment 414629 [details]
backported patch
Comment 7 Aristeu Rozanski 2010-05-25 13:42:29 EDT
Patch(es) available on kernel-2.6.32-29.el6
Comment 10 Xiao jing Fang 2010-08-23 23:33:54 EDT
reproduced at 2.6.32-1.el6.x86_64,the traffic output:
11:27:02.729739 IP dhcp-65-173.nay.redhat.com.58802 > intel-s3e36-01.lab.bos.redhat.com.33521: Flags [S], seq 2188062984, win 5840, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
11:27:03.021021 IP intel-s3e36-01.lab.bos.redhat.com.33521 > dhcp-65-173.nay.redhat.com.58802: Flags [S.], seq 1897757814, ack 2188062985, win 5840, options [mss 1360,nop,nop,sackOK,nop,wscale 7], length 0
11:27:03.021081 IP dhcp-65-173.nay.redhat.com.58802 > intel-s3e36-01.lab.bos.redhat.com.33521: Flags [.], ack 1, win 46, length 0
11:27:23.021522 IP dhcp-65-173.nay.redhat.com.58802 > intel-s3e36-01.lab.bos.redhat.com.33521: Flags [P.], seq 1:13, ack 1, win 46, length 12
11:27:23.315293 IP intel-s3e36-01.lab.bos.redhat.com.33521 > dhcp-65-173.nay.redhat.com.58802: Flags [.], ack 13, win 46, length 0
11:27:43.021735 IP dhcp-65-173.nay.redhat.com.58802 > intel-s3e36-01.lab.bos.redhat.com.33521: Flags [P.], seq 13:25, ack 1, win 46, length 12
11:27:43.308052 IP intel-s3e36-01.lab.bos.redhat.com.33521 > dhcp-65-173.nay.redhat.com.58802: Flags [.], ack 13, win 46, length 0
11:27:43.308095 IP dhcp-65-173.nay.redhat.com.58802 > intel-s3e36-01.lab.bos.redhat.com.33521: Flags [.], ack 1, win 46, length 0
11:27:43.311931 IP intel-s3e36-01.lab.bos.redhat.com.33521 > dhcp-65-173.nay.redhat.com.58802: Flags [.], ack 25, win 46, length 0

verified at 2.6.32-54.el6.i686,traffic output:
23:26:25.180635 IP sgi-xe320-01.rhts.eng.bos.redhat.com.33521 > dhcp-65-173.nay.redhat.com.57500: Flags [S.], seq 1494619596, ack 1239595962, win 5840, options [mss 1460,nop,nop,sackOK,nop,wscale 6], length 0
23:26:25.470576 IP dhcp-65-173.nay.redhat.com.57500 > sgi-xe320-01.rhts.eng.bos.redhat.com.33521: Flags [.], ack 1, win 46, length 0
23:26:45.473123 IP dhcp-65-173.nay.redhat.com.57500 > sgi-xe320-01.rhts.eng.bos.redhat.com.33521: Flags [P.], seq 1:13, ack 1, win 46, length 12
23:26:45.473140 IP sgi-xe320-01.rhts.eng.bos.redhat.com.33521 > dhcp-65-173.nay.redhat.com.57500: Flags [.], ack 13, win 92, length 0
23:27:05.473776 IP dhcp-65-173.nay.redhat.com.57500 > sgi-xe320-01.rhts.eng.bos.redhat.com.33521: Flags [P.], seq 13:25, ack 1, win 46, length 12
23:27:05.473788 IP sgi-xe320-01.rhts.eng.bos.redhat.com.33521 > dhcp-65-173.nay.redhat.com.57500: Flags [.], ack 25, win 92, length 0
23:27:25.474677 IP dhcp-65-173.nay.redhat.com.57500 > sgi-xe320-01.rhts.eng.bos.redhat.com.33521: Flags [P.], seq 25:37, ack 1, win 46, length 12
23:27:25.474705 IP sgi-xe320-01.rhts.eng.bos.redhat.com.33521 > dhcp-65-173.nay.redhat.com.57500: Flags [.], ack 37, win 92, length 0
Comment 11 releng-rhel@redhat.com 2010-11-11 11:04:08 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. 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.