diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/cifsglob.h | 1 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 11 |
2 files changed, 6 insertions, 6 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 4a2715b389c6..c412568b4a1a 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -185,6 +185,7 @@ struct TCP_Server_Info { | |||
185 | struct mac_key mac_signing_key; | 185 | struct mac_key mac_signing_key; |
186 | char ntlmv2_hash[16]; | 186 | char ntlmv2_hash[16]; |
187 | unsigned long lstrp; /* when we got last response from this server */ | 187 | unsigned long lstrp; /* when we got last response from this server */ |
188 | u16 dialect; /* dialect index that server chose */ | ||
188 | }; | 189 | }; |
189 | 190 | ||
190 | /* | 191 | /* |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 4ecb361640bf..1372253a0606 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -355,7 +355,6 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
355 | struct TCP_Server_Info *server; | 355 | struct TCP_Server_Info *server; |
356 | u16 count; | 356 | u16 count; |
357 | unsigned int secFlags; | 357 | unsigned int secFlags; |
358 | u16 dialect; | ||
359 | 358 | ||
360 | if (ses->server) | 359 | if (ses->server) |
361 | server = ses->server; | 360 | server = ses->server; |
@@ -408,10 +407,10 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
408 | if (rc != 0) | 407 | if (rc != 0) |
409 | goto neg_err_exit; | 408 | goto neg_err_exit; |
410 | 409 | ||
411 | dialect = le16_to_cpu(pSMBr->DialectIndex); | 410 | server->dialect = le16_to_cpu(pSMBr->DialectIndex); |
412 | cFYI(1, "Dialect: %d", dialect); | 411 | cFYI(1, "Dialect: %d", server->dialect); |
413 | /* Check wct = 1 error case */ | 412 | /* Check wct = 1 error case */ |
414 | if ((pSMBr->hdr.WordCount < 13) || (dialect == BAD_PROT)) { | 413 | if ((pSMBr->hdr.WordCount < 13) || (server->dialect == BAD_PROT)) { |
415 | /* core returns wct = 1, but we do not ask for core - otherwise | 414 | /* core returns wct = 1, but we do not ask for core - otherwise |
416 | small wct just comes when dialect index is -1 indicating we | 415 | small wct just comes when dialect index is -1 indicating we |
417 | could not negotiate a common dialect */ | 416 | could not negotiate a common dialect */ |
@@ -419,8 +418,8 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
419 | goto neg_err_exit; | 418 | goto neg_err_exit; |
420 | #ifdef CONFIG_CIFS_WEAK_PW_HASH | 419 | #ifdef CONFIG_CIFS_WEAK_PW_HASH |
421 | } else if ((pSMBr->hdr.WordCount == 13) | 420 | } else if ((pSMBr->hdr.WordCount == 13) |
422 | && ((dialect == LANMAN_PROT) | 421 | && ((server->dialect == LANMAN_PROT) |
423 | || (dialect == LANMAN2_PROT))) { | 422 | || (server->dialect == LANMAN2_PROT))) { |
424 | __s16 tmp; | 423 | __s16 tmp; |
425 | struct lanman_neg_rsp *rsp = (struct lanman_neg_rsp *)pSMBr; | 424 | struct lanman_neg_rsp *rsp = (struct lanman_neg_rsp *)pSMBr; |
426 | 425 | ||