Bug 593040

Summary: TCP: avoid to send keepalive probes if receiving data
Product: Red Hat Enterprise Linux 5 Reporter: Flavio Leitner <fleitner>
Component: kernelAssignee: Flavio Leitner <fleitner>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: branto, jarod, kzhang
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 21:32:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 593052    
Attachments:
Description Flags
backported patch none

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>
Signed-off-by: Eric Dumazet <eric.dumazet>
Acked-by: Ilpo Järvinen <ilpo.jarvinen>
Signed-off-by: David S. Miller <davem>
---

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.

Additional info:
Brew build url with the upstream patch backported and applied:
https://brewweb.devel.redhat.com/taskinfo?taskID=2444536

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
release.

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.

http://rhn.redhat.com/errata/RHSA-2011-0017.html