Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag '5.9-rc2-smb-fix' of git://git.samba.org/sfrench/cifs-2.6

Pull cfis fix from Steve French:
"DFS fix for referral problem when using SMB1"

* tag '5.9-rc2-smb-fix' of git://git.samba.org/sfrench/cifs-2.6:
cifs: fix check of tcon dfs in smb1

+16 -1
+15
fs/cifs/cifsglob.h
··· 2031 2031 return strcmp(server->vals->version_string, SMB1_VERSION_STRING) == 0; 2032 2032 } 2033 2033 2034 + static inline bool is_tcon_dfs(struct cifs_tcon *tcon) 2035 + { 2036 + /* 2037 + * For SMB1, see MS-CIFS 2.4.55 SMB_COM_TREE_CONNECT_ANDX (0x75) and MS-CIFS 3.3.4.4 DFS 2038 + * Subsystem Notifies That a Share Is a DFS Share. 2039 + * 2040 + * For SMB2+, see MS-SMB2 2.2.10 SMB2 TREE_CONNECT Response and MS-SMB2 3.3.4.14 Server 2041 + * Application Updates a Share. 2042 + */ 2043 + if (!tcon || !tcon->ses || !tcon->ses->server) 2044 + return false; 2045 + return is_smb1_server(tcon->ses->server) ? tcon->Flags & SMB_SHARE_IS_IN_DFS : 2046 + tcon->share_flags & (SHI1005_FLAGS_DFS | SHI1005_FLAGS_DFS_ROOT); 2047 + } 2048 + 2034 2049 #endif /* _CIFS_GLOB_H */
+1 -1
fs/cifs/connect.c
··· 4909 4909 if (!tcon) 4910 4910 continue; 4911 4911 /* Make sure that requests go through new root servers */ 4912 - if (tcon->share_flags & (SHI1005_FLAGS_DFS | SHI1005_FLAGS_DFS_ROOT)) { 4912 + if (is_tcon_dfs(tcon)) { 4913 4913 put_root_ses(root_ses); 4914 4914 set_root_ses(cifs_sb, ses, &root_ses); 4915 4915 }