Skip to contentSkip to conversation

Missing patch for reconnect during NegotiateProtocol

DISCUSSION Leif Sahlberg 1 participant 1 message Sep 1, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#2 lore raw
In reply to a message not in the archive

Steven,

Please add a Reviewed-by: Ronnie Sahlberg <[email protected]> for the patch in the link below :

http://www.spinics.net/lists/linux-cifs/msg12842.html

I have tested this patch using samba and iptables.

Testing :
Connect to an smb2 share.
On server, add these iptable rules :

sudo iptables -I INPUT 1 -p tcp --dport 445 --tcp-flags SYN,RST,ACK,FIN SYN -j ACCEPT sudo iptables -I INPUT 2 -p tcp --dport 445 -j DROP

Eventually the Keepalives that are not responded to result in a TCP session reconnect followed by a Negotiate Protocol request.

With this patch, every few minutes the client will reconnect a new TCP session and try NegotiateProtocol again.

Without this patch, the client is stuck waiting for the first Negotiate Protocol forever.

regards
ronnie sahlberg