|
@@ -922,7 +922,7 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree,
|
|
if (tcon && tcon->bad_network_name)
|
|
if (tcon && tcon->bad_network_name)
|
|
return -ENOENT;
|
|
return -ENOENT;
|
|
|
|
|
|
- if ((tcon->seal) &&
|
|
|
|
|
|
+ if ((tcon && tcon->seal) &&
|
|
((ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION) == 0)) {
|
|
((ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION) == 0)) {
|
|
cifs_dbg(VFS, "encryption requested but no server support");
|
|
cifs_dbg(VFS, "encryption requested but no server support");
|
|
return -EOPNOTSUPP;
|
|
return -EOPNOTSUPP;
|