mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
libsmbclient: Allow server (NetApp) to return STATUS_INVALID_PARAMETER from an echo.
It does this if we send a session ID of zero. The server still replied. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13007 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Nov 11 08:44:37 CET 2017 on sn-devel-144
This commit is contained in:
parent
37ac8ad4bf
commit
a0f6ea8dec
@ -6027,7 +6027,13 @@ static void readline_callback(void)
|
|||||||
/* Ping the server to keep the connection alive using SMBecho. */
|
/* Ping the server to keep the connection alive using SMBecho. */
|
||||||
memset(garbage, 0xf0, sizeof(garbage));
|
memset(garbage, 0xf0, sizeof(garbage));
|
||||||
status = cli_echo(cli, 1, data_blob_const(garbage, sizeof(garbage)));
|
status = cli_echo(cli, 1, data_blob_const(garbage, sizeof(garbage)));
|
||||||
if (NT_STATUS_IS_OK(status)) {
|
if (NT_STATUS_IS_OK(status) ||
|
||||||
|
NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) {
|
||||||
|
/*
|
||||||
|
* Even if server returns NT_STATUS_INVALID_PARAMETER
|
||||||
|
* it still responded.
|
||||||
|
* BUG: https://bugzilla.samba.org/show_bug.cgi?id=13007
|
||||||
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,8 +61,17 @@ SMBC_check_server(SMBCCTX * context,
|
|||||||
1,
|
1,
|
||||||
data_blob_const(data, sizeof(data)));
|
data_blob_const(data, sizeof(data)));
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
|
/*
|
||||||
|
* Some NetApp servers return
|
||||||
|
* NT_STATUS_INVALID_PARAMETER.That's OK, they still
|
||||||
|
* replied.
|
||||||
|
* BUG: https://bugzilla.samba.org/show_bug.cgi?id=13007
|
||||||
|
*/
|
||||||
|
if (!NT_STATUS_EQUAL(status,
|
||||||
|
NT_STATUS_INVALID_PARAMETER)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
server->last_echo_time = now;
|
server->last_echo_time = now;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user