diff options
-rw-r--r-- | libcli/smb/smbXcli_base.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index dad869c2c0..d9b17f83bb 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -2422,6 +2422,12 @@ static bool smb2cli_req_cancel(struct tevent_req *req) } substate = tevent_req_data(subreq, struct smbXcli_req_state); + /* + * clear everything but the SMB2_HDR_FLAG_ASYNC flag + * e.g. if SMB2_HDR_FLAG_CHAINED is set we get INVALID_PARAMETER back + */ + flags &= SMB2_HDR_FLAG_ASYNC; + if (flags & SMB2_HDR_FLAG_ASYNC) { mid = 0; } |