libsmbclient: Allow server (NetApp) to return STATUS_INVALID_PARAMETER from an echo.
[nivanova/samba-autobuild/.git] / source3 / client / client.c
index 8f449e813118bc23cc7f7fc371e7a815d299c31a..754907d2e095c902667d42fd6a33e229fc04f1ec 100644 (file)
@@ -6027,7 +6027,13 @@ static void readline_callback(void)
        /* Ping the server to keep the connection alive using SMBecho. */
        memset(garbage, 0xf0, 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;
        }