SMB protocol version selector

Issue #733 resolved
Peter Urbanec created an issue

The default SMB protocol version of 2.1 is causing incompatibility issues with some legacy equipment, such as QNAP NAS devices. Users are finding it difficult to edit the mount options text field. The network configuration for SMB mounts needs a control to allow the user to select SMB protocol version using a simple list of valid options.

Unfortunately, different versions of the Linux kernel support a different subset of SMB protocol version options. A control that selects from a subset of the following options (derived from Linux 5.4.11), depending on the running kernel, is needed:

  • (None)
  • vers=1.0
  • vers=2.0
  • vers=2.1
  • vers=default
  • vers=3
  • vers=3.0
  • vers=3.02
  • vers=3.0.2
  • vers=3.11
  • vers=3.1.1

Linux 3.6.0 only supports None, 1.0 and 2.1

Linux 3.12.1 only supports None, 1.0, 2.0, 2.1, 3.0 and 3.02

Linux 3.14.2 only supports None, 1.0, 2.0, 2.1, 3.0 and 3.02

Linux 4.4.35 only supports None, 1.0, 2.0, 2.1, 3.0, 3.02, 3.1.1 and 3.11

Linux 4.9.51 only supports None, 1.0, 2.0, 2.1, 3.0, 3.02, 3.1.1 and 3.11

It seems that (None), vers=1.0 and vers=2.1 should work on all version and vers=3.0 can be added for kernel 3.12 and later.

The control will need to adjust it’s selection list depending on the machine it runs on (might be able to just special case a beyonwizt3). It will also need to parse the mount options and ensure that the version specification remains consistent. (Perhaps by removing it from the mount options text editor.)

Comments (2)

  1. Peter Urbanec reporter

    Correction - Linux 3.6.0 does not support 2.1 as SMB2 support is marked as BROKEN in Kconfig.

  2. Log in to comment