Problem accessing SMB share using SMB2 and LMv2

Support for Android version of Total Commander

Moderators: Hacker, Stefan2, white, sheep

Post Reply
bobobear1977
Junior Member
Junior Member
Posts: 3
Joined: 2018-01-26, 23:49 UTC

Problem accessing SMB share using SMB2 and LMv2

Post by *bobobear1977 » 2018-01-27, 00:03 UTC

Hi!

For some reason, TC suddenly stopped connecting to my SMB2 shares with LMv2 auth enabled on all my android devices (Samsung Galaxy S7 and Galaxy Tab S3, both with Nougat 7.0), giving a "no route to host" error. Setting the LMv1 option made it work again, which is acceptable as a temporary workaround. I did some more testing, and it turns out that when reverting everything to SMB1, LMv2 auth works fine, which is weird. So, the only combination out of the possible four currently not working is SMB2 and LMv2.

The counterpart is a Synology DiskStation running DSM 6.1.4-15217 u5 (current version).

A couple of days ago, everything worked like a charm. There were no system updates on any of the devices or the NAS since then and I made no config changes to the NAS in the meantime.

Any idea how to get SMB2 and LMv2 working together again?

Many thanks and greetings,
bb

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36363
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-01-29, 14:59 UTC

Are you sure the diskStation supports SMB2? LMv2 authentication is supported by both SMB1 and SMB2.

However, the error seems to indicate a problem with name resolution. My plugin tries both DNS lookup and SMB name resolution, and uses whichever returns the name first. "No route to host" indicates that the server returns multiple IP addresses, but not all of them can be reached from the phone.
Author of Total Commander
http://www.ghisler.com

bobobear1977
Junior Member
Junior Member
Posts: 3
Joined: 2018-01-26, 23:49 UTC

Re: Problem accessing SMB share using SMB2 and LMv2

Post by *bobobear1977 » 2018-01-30, 09:44 UTC

Thanks for the info, I gave the problem another look. To me, it really doesn't make sense. Here's what I've got:

The server in question is a Synology DS1517+ running the latest update of DSM 6.1.4 from December 21, 2017. The samba server installed on it is a v4.4.13 and supports everything up to SMB3. I can configure the "min protocol" and "max protocol" options from the DSM Web UI, currently it's set to accept all SMB Versions, but I will disable SMB1 as soon as this issue is resolved. The box is connected to a switch using all 4 GBit Ethernet ports in a static link aggregation group. Lastly, there is a FritzBox 7590 also connected to that switch acting as Router, Gateway, DHCP-Server, DNS and what-not. All three of these devices have the latest software installed and none have received any updates or have been reconfigured by me since December.

Here's what I've tested so far:
- Windows Clients find the DiskStation in the network places and connect fine.
- Linux Clients mount all shares correctly using SMB1, SMB2 or SMB3 as mount options.
- TC on Android works with three combinatoins: SMB1+LMv1, SMB1+LMv2, SMB2+LMv1
- TC does no longer work with SMB2+LMv2, since a few days ago. Before that, it worked well. Nothing in the configuration of either the network devices or the phone was changed at the time it stopped working

I have always used the IP address of the DS1517+ rather than the server name setting up the connection to the shares in TC, so name resolution should not be a problem. In testing, I removed the connections from TC and set them up again, trying both IP address and server name, all of which came up with the same results. I have also already rebooted all of the devices in question, to no avail.

So, I seem to end up with the rather confusing question of why this one configuration in TC suddenly might have stopped working after being OK ever since the SMB2 option was added to the plugin.

Have you got any ideas where else to look for the error?

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36363
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-02-01, 10:49 UTC

No, unfortunately not - it may be a bug in the used smbj library (maybe the DiskStation isn't 100% LMv2 compatible or so), resulting in a protocol error. But I couldn't find any bug reports regarding LMv2 in the github project of smbj.
Author of Total Commander
http://www.ghisler.com

bobobear1977
Junior Member
Junior Member
Posts: 3
Joined: 2018-01-26, 23:49 UTC

Re: Problem accessing SMB share using SMB2 and LMv2

Post by *bobobear1977 » 2018-02-03, 12:06 UTC

The problem is resolved. Yesterday brought a Synology update, after which the problem was gone. Seems it was something with the NAS after all...

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36363
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-02-05, 14:57 UTC

I see - thanks for letting me know!
Author of Total Commander
http://www.ghisler.com

Post Reply