]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cifs: Allow to disable or force initialization of NetBIOS session
authorPali Rohár <pali@kernel.org>
Sun, 27 Oct 2024 11:13:12 +0000 (12:13 +0100)
committerSteve French <stfrench@microsoft.com>
Tue, 1 Apr 2025 06:54:17 +0000 (01:54 -0500)
commit7d14dd683b1b00451fecfdfc86d2d6539bd8a21e
tree508465835c3d751e51aa418c634cc4c02eca5fda
parentb1a37df6ba2f13be341130b9fe10649ef6a42e9a
cifs: Allow to disable or force initialization of NetBIOS session

Currently SMB client always tries to initialize NetBIOS session when the
server port is 139. This is useful for default cases, but nowadays when
using non-standard routing or testing between VMs, it is common that
servers are listening on non-standard ports.

So add a new mount option -o nbsessinit and -o nonbsessinit which either
forces initialization or disables initialization regardless of server port
number.

This allows Linux SMB client to connect to older SMB1 server listening on
non-standard port, which requires initialization of NetBIOS session, by
using additional mount options -o port= and -o nbsessinit.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsglob.h
fs/smb/client/connect.c
fs/smb/client/fs_context.c
fs/smb/client/fs_context.h