]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fix syncookie regression
authorEric Dumazet <eric.dumazet@gmail.com>
Sat, 10 Mar 2012 09:20:21 +0000 (09:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Mar 2012 22:52:12 +0000 (15:52 -0700)
commit0e0e49885a9334e6e4edd6123a5852e3653f5b0a
treefbce07add57f0ab7a16792b4af461d2f9e265fb6
parentb06dd1ab05f10080c6da8e8030b65401de579fcd
tcp: fix syncookie regression

commit 1b56e7407f (ipv4: Don't use rt->rt_{src,dst} in ip_queue_xmit())
added a serious regression on synflood handling.

Simon Kirby discovered a successful connection was delayed by 20 seconds
before being responsive.

In my tests, I discovered that xmit frames were lost, and needed ~4
retransmits and a socket dst rebuild before being really sent.

In case of syncookie initiated connection, we use a different path to
initialize the socket dst, and inet->cork.fl.u.ip4 is left cleared.

As ip_queue_xmit() now depends on inet flow being setup, fix this by
copying the temp flowi4 we use in cookie_v4_check().

Reported-by: Simon Kirby <sim@netnation.com>
Bisected-by: Simon Kirby <sim@netnation.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/syncookies.c
net/ipv4/tcp_ipv4.c