tcp: allow user to create repair socket without window probes
Subsystems (3)
PATCH 1/1 tcp: allow user to create repair socket without window probes
Under rare conditions where repair code may be used it is possible that window probes are either unnecessary or undesired. If the user knows that window probes are not wanted or needed this change allows them to skip sending them when a socket comes out of repair.
--- net/ipv4/tcp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
net/ipv4/tcp.c +5 -3
@@ -2821,14 +2821,16 @@ static int do_tcp_setsockopt(struct sock *sk, int level,case TCP_REPAIR :if (!tcp_can_repair_sock (sk)) err = -EPERM ; -else if (val ==1 ) { - tp->repair =1 ; +/* 1 for normal repair, 2 for no window probes */ +else if (val ==1 || val ==2 ) { + tp->repair = val; sk->sk_reuse =SK_FORCE_REUSE ; tp->repair_queue =TCP_NO_QUEUE ; }else if (val ==0 ) { tp->repair =0 ; sk->sk_reuse =SK_NO_REUSE ; -tcp_send_window_probe (sk); +if (tp->repair ==1 ) +tcp_send_window_probe (sk); }else err = -EINVAL ;
Signature · 1 line
1.8.3.1
From: Stefan Baranoff <[email protected]>
Date: Tue, 10 Jul 2018 17:31:10 -0400
Quoted 6 lines
Under rare conditions where repair code may be used it is possible that window probes are either unnecessary or undesired. If the user knows that window probes are not wanted or needed this change allows them to skip sending them when a socket comes out of repair.
Signed-off-by Stefan Baranoff <[email protected]>
Applied.
Quoted 12 lines · David Miller
From: Stefan Baranoff <[email protected]>
Date: Tue, 10 Jul 2018 17:31:10 -0400Quoted 6 lines
Under rare conditions where repair code may be used it is possible that window probes are either unnecessary or undesired. If the user knows that window probes are not wanted or needed this change allows them to skip sending them when a socket comes out of repair.
Signed-off-by Stefan Baranoff <[email protected]>Applied.
This buggy patch was added to net tree, it really should have been sent to net-next.
Stefan, please send a fix.
Thanks.
Quoted 5 lines · Stefan Baranoff
Before I put my foot in my mouth one more time and end up on everyone's naughty list - can someone help guide me on a couple of questions?
What is the correct way to resubmit this, just as a simple v2 or does it need cherry picked out and moved over to net-next somehow?
Part of the fix is to remember to include my header file changes to increase the size of repair from 1 bit to 2 ininclude/linux/tcp.h- does that make this patch's change require any additional work, notices, etc?
Patch was officially merged, so there wont be a V2.
Please send a patch to fix the issue on top of current David net tree
Thanks.