From 89ccd23d0f51c769bde95f8238a1ea47d9343224 Mon Sep 17 00:00:00 2001 From: Steve French Date: Thu, 9 Aug 2018 09:43:12 -0300 Subject: [PATCH] smb3: on reconnect set PreviousSessionId field BugLink: http://bugs.launchpad.net/bugs/1786110 The server detects reconnect by the (non-zero) value in PreviousSessionId of SMB2/SMB3 SessionSetup request, but this behavior regressed due to commit 166cea4dc3a4f66f020cfb9286225ecd228ab61d ("SMB2: Separate RawNTLMSSP authentication from SMB2_sess_setup") CC: Stable CC: Sachin Prabhu Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg (cherry picked from commit b2adf22fdfba85a6701c481faccdbbb3a418ccfc) Signed-off-by: Marcelo Henrique Cerri Acked-by: Kamal Mostafa Acked-by: Stefan Bader Signed-off-by: Khalid Elmously --- fs/cifs/smb2pdu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 18bf0b9f19ed..f942827ca0cb 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -1181,6 +1181,7 @@ SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses, sess_data->ses = ses; sess_data->buf0_type = CIFS_NO_BUFFER; sess_data->nls_cp = (struct nls_table *) nls_cp; + sess_data->previous_session = ses->Suid; while (sess_data->func) sess_data->func(sess_data); -- 2.39.5