]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Namespaceify tcp_fastopen_blackhole_timeout knob
authorHaishuang Yan <yanhaishuang@cmss.chinamobile.com>
Wed, 27 Sep 2017 03:35:43 +0000 (11:35 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Oct 2017 00:55:54 +0000 (17:55 -0700)
commit83617e85535760cbff727b3732531b980426c1dc
tree972622b76e08246aee043832bdc8224f6ac50501
parente1afe3bc80152ea7e3f09851a590a0b3c55156fb
ipv4: Namespaceify tcp_fastopen_blackhole_timeout knob

Different namespace application might require different time period in
second to disable Fastopen on active TCP sockets.

Tested:
Simulate following similar situation that the server's data gets dropped
after 3WHS.
C ---- syn-data ---> S
C <--- syn/ack ----- S
C ---- ack --------> S
S (accept & write)
C?  X <- data ------ S
[retry and timeout]

And then print netstat of TCPFastOpenBlackhole, the counter increased as
expected when the firewall blackhole issue is detected and active TFO is
disabled.
# cat /proc/net/netstat | awk '{print $91}'
TCPFastOpenBlackhole
1

Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/netns/ipv4.h
net/ipv4/sysctl_net_ipv4.c
net/ipv4/tcp_fastopen.c
net/ipv4/tcp_ipv4.c