Bug 13007 - smbclient should not terminate the connection if a ECHO request gets an error returned from the server
smbclient should not terminate the connection if a ECHO request gets an error...
Status: ASSIGNED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: libsmbclient
4.6.2
All All
: P5 normal
: ---
Assigned To: Jeremy Allison
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-31 12:50 UTC by Andreas Schneider
Modified: 2017-09-12 10:09 UTC (History)
2 users (show)

See Also:


Attachments
git-am fix for master (1.19 KB, patch)
2017-09-08 23:22 UTC, Jeremy Allison
no flags Details
git-am fix for master (1.93 KB, patch)
2017-09-08 23:29 UTC, Jeremy Allison
jra: review? (asn)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2017-08-31 12:50:06 UTC
Currently when we connect to a NetApp server and smbclient or libsmbclient sends an echo request a NetApp Server responds with STATUS_INVALID_PARAMETER because it can't deal with a session ID of 0.
If we get a response from a server we should not terminate the connection but see it as the server is responsive.


Quote from cifs-protocol:

Client behavior in regards to ECHO is implementation-specific (there is no mention in section 3.2). ECHO is merely a keep-alive ping to see if the server is responsive, so any response could be considered success. All the Server does (besides disconnecting the connection if Connection.SessionTable is empty) is validate the structure of the request. If the server returns STATUS_INVALID_PARAMETER, this indicates the Client formed the request incorrectly, but shows the Server is responsive (as does any response, error or success). 

See https://lists.samba.org/archive/cifs-protocol/2017-July/003071.html


The server docs have been updated, see:
https://lists.samba.org/archive/cifs-protocol/2017-July/003073.html
Comment 1 Jeremy Allison 2017-09-08 23:22:47 UTC
Created attachment 13561 [details]
git-am fix for master

Andreas, can you test this please ? I don't have a NetApp here.
Comment 2 Jeremy Allison 2017-09-08 23:29:34 UTC
Created attachment 13562 [details]
git-am fix for master

Forgot to fix smbclient as well in previous patch.
Comment 3 Andreas Schneider 2017-09-12 10:09:36 UTC
I will try to get feedback. However could be October ...