This is a note to let you know that I've just added the patch titled

    tcp: refine SYN handling in tcp_validate_incoming

to the 3.4-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tcp-refine-syn-handling-in-tcp_validate_incoming.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 6f9405f9a7f96ea231b46642df9d185b0bc1a53d Mon Sep 17 00:00:00 2001
From: Eric Dumazet <[email protected]>
Date: Tue, 17 Jul 2012 12:29:30 +0000
Subject: tcp: refine SYN handling in tcp_validate_incoming


From: Eric Dumazet <[email protected]>

[ Upstream commit e371589917011efe6ff8c7dfb4e9e81934ac5855 ]

Followup of commit 0c24604b68fc (tcp: implement RFC 5961 4.2)

As reported by Vijay Subramanian, we should send a challenge ACK
instead of a dup ack if a SYN flag is set on a packet received out of
window.

This permits the ratelimiting to work as intended, and to increase
correct SNMP counters.

Suggested-by: Vijay Subramanian <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Acked-by: Vijay Subramanian <[email protected]>
Cc: Kiran Kumar Kella <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 net/ipv4/tcp_input.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5314,8 +5314,11 @@ static bool tcp_validate_incoming(struct
                 * an acknowledgment should be sent in reply (unless the RST
                 * bit is set, if so drop the segment and return)".
                 */
-               if (!th->rst)
+               if (!th->rst) {
+                       if (th->syn)
+                               goto syn_challenge;
                        tcp_send_dupack(sk, skb);
+               }
                goto discard;
        }
 
@@ -5345,6 +5348,7 @@ static bool tcp_validate_incoming(struct
         * RFC 5691 4.2 : Send a challenge ack
         */
        if (th->syn) {
+syn_challenge:
                if (syn_inerr)
                        TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_INERRS);
                NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPSYNCHALLENGE);


Patches currently in stable-queue which might be from [email protected] are

queue-3.4/tcp-implement-rfc-5961-4.2.patch
queue-3.4/tcp-implement-rfc-5961-3.2.patch
queue-3.4/tcp-rfc-5961-5.2-blind-data-injection-attack-mitigation.patch
queue-3.4/tcp-refine-syn-handling-in-tcp_validate_incoming.patch
queue-3.4/tcp-tcp_replace_ts_recent-should-not-be-called-from-tcp_validate_incoming.patch
queue-3.4/net-sched-integer-overflow-fix.patch
queue-3.4/tcp-fix-msg_sendpage_notlast-logic.patch
queue-3.4/bonding-bonding-driver-does-not-consider-the-gso_max_size-gso_max_segs-setting-of-slave-devices.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to