Ksmbd (Samba3/4 alternative, ex cifsd/smbd) package support thread

How are you trying to access it from Linux.

Are you writing in the file manager address bar smb://ip_address_of_share or from a terminal session with smbclient //server_or_ip_address/share_name -U username ?

I tried this from file manager.

I don't know much about patches from the network stack. If I can reproduce this issue on my target, I can determine whether it's a ksmbd issue or not. Is the issue still reproducible?

Without above patch that I currently test, my ksmbd shares were unavailable randomly on two routers using ksmbd with recent kernels (6.12.43 and 6.12.44). I haven’t noticed this behaviour with 6.12.40 for example.

@Gingernut @linkinjeon

As I use SSDs formatted with f2fs file system I use below mounting options too noatime,nodiratime because I don’t want unnecessary writes to SSDs when only accessing files and directories. So preventing an unnecessary wearing and gain performance too.


config mount
	option target '/mnt/sda1'
	option uuid 'xxxxxxxxxxxxxxxxxxxxxxx'
	option options  'noatime,nodiratime'
	option enabled '1'

The patch below has not been applied into mainline yet and is currently under review. Therefore, you need to wait until it is applied.

ā€œ[REGRESSION][BISECTED][PATCH] net: ipv4: fix regression in broadcast routesā€

It was backported to OpenWrt main branch but actually I don’t know if it’s going to help.

@linkinjeon

I’ve just noticed this on another router with k.6.6.103. I have ksmbd only installed and running on it but I don’t have any shares on it.

[12381.903563] ksmbd: No IPC daemon response for 20s

On router running k. 6.12.43 I see this

[455127.425778] ksmbd: Failed to send message: -32
[455127.425840] ksmbd: Failed to send message: -32
[455127.429315] ksmbd: Failed to send message: -32
[455127.433704] ksmbd: Failed to send message: -32
[455127.438223] ksmbd: Failed to send message: -32
[455127.442709] ksmbd: Failed to send message: -32
[455127.447211] ksmbd: Failed to send message: -32
[455127.451731] ksmbd: Failed to send message: -32
[455127.451907] ksmbd: Failed to send message: -32
[455127.456228] ksmbd: Failed to send message: -32
[455127.456247] ksmbd: Failed to send message: -32

Yes, I have the same problem of the share not being available.

It seems to be just the discovery of the share on the network that is the issue so that patch might be the fix. I need to test.

Do you compile by yourself the source?

Yes. I compile from qosmio repo main NSS OpenWrt branch.

Do you use the option -O2?
If yes try to use -Os.

Thanks

Probably not related because on one of the routers I use -Os and on the other -O2.

@pesa1234 There is a new version.

Can you make a PR to OpenWrt repository to update the package.
Anyone seeing slow write/read speeds when using qbittorrent and ksmbd?
I have this issue with qbittorrent.
Ping @linkinjeon

1 Like

Yes I’ll do it on next days, now I’m abroad and I don’t have so much time.

2 Likes

No worries, when you have spare time.

Done

3 Likes

Thanks. I've updated my builds and I no longer see the issue I had recently.
@linkinjeon

Any additional explanation about this change -

  • Add max ip connections parameter. (ready for future upstream fix) at the moment is reverted by.

You can read full history.

1 Like

I have already read it. I just wasn't sure that was the reason in my case because I saw this on Windows mostly but the issue was about Linux. That's why I report it here.
Thanks.

Hi. @pesa1234

@linkinjeon @pesa1234
I've just compiled with all the latest commits from the main OpenWrt branch including this PR. Latest ksmbd version 3.5.5.

root@RB5009:~# uname -a
Linux RB5009 6.12.53 #0 SMP Fri Oct 17 13:22:38 2025 aarch64 GNU/Linux

Unfortunately I'm unable to access the network share from two Windows 11 Pro PCs updated to the latest 25H2 with latest updates and from two Linux PCs.
I have another router (still running on kernel 6.12.51 without above PR) and ksmbd version 3.5.5 and I can access the share from all Windows and Linux PCs.
When I try to access the share I see this error in the OpenWrt log

Fri Oct 17 17:57:18 2025 kern.err kernel: [  370.322336] ksmbd: Failed to send message: -32
Fri Oct 17 17:59:23 2025 kern.err kernel: [  495.122904] ksmbd: Failed to send message: -32
Fri Oct 17 18:04:26 2025 kern.err kernel: [  798.484694] ksmbd: Failed to send message: -32
Fri Oct 17 18:09:12 2025 kern.err kernel: [ 1084.006659] ksmbd: Failed to send message: -32
Fri Oct 17 18:16:17 2025 kern.err kernel: [ 1509.118717] ksmbd: Failed to send message: -32
Fri Oct 17 18:16:17 2025 kern.err kernel: [ 1509.123304] ksmbd: Failed to send message: -32
Fri Oct 17 18:41:47 2025 kern.err kernel: [ 3039.298308] ksmbd: Failed to send message: -32
Fri Oct 17 18:45:04 2025 kern.err kernel: [ 3236.089321] ksmbd: Failed to send message: -32

Maybe the PR requires more work?