From 1d54d8c501afa151b6cc07b98a14caae2b31ec65 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 17 Sep 2013 04:09:03 +0200 Subject: libcli/smb: use SMB1 MID=0 for the initial Negprot Bug: https://bugzilla.samba.org/show_bug.cgi?id=10144 Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- libcli/smb/smbXcli_base.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libcli') diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index 7176e8f7a3..0fd3d4c2a0 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -737,6 +737,14 @@ static uint16_t smb1cli_alloc_mid(struct smbXcli_conn *conn) size_t num_pending = talloc_array_length(conn->pending); uint16_t result; + if (conn->protocol == PROTOCOL_NONE) { + /* + * This is what windows sends on the SMB1 Negprot request + * and some vendors reuse the SMB1 MID as SMB2 sequence number. + */ + return 0; + } + while (true) { size_t i; -- cgit