-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android phones and TV boxes using Android with Kodi issue #476
Comments
Can you reproduce it with ksmbd github or ksmbd in linux-kernel ? |
I am not sure how to do any of that or compiling my own stuff I never done any of that. All I know is the DD-wrt Developer did this here. |
When I have tested(movie play) using kodi app on ubuntu, there is no problem. |
As I know, ksmbd in dd-wrt is different with github ksmbd source(https:/namjaejeon/ksmbd). |
The issue comes up with Android versions of Kodi. Android based phones and TV boxes with Android on them. Windows Kodi and Linux Kodi is fine. It may just be an Android issue I should be asking on Kodi forum. In DD-WRT the drives with the files are shared as Public and also tried username and password with samba protocols set to 2.0 and 3 they were accessed from Kodi at smb://192.168.1.1 The drives are formatted in EXT4 not NTFS. |
Okay, I will try to reproduce it using Android Kodi. |
I have installed and tested kodi app on android phone. It work fine to me. |
I am not a guru with doing this. I don't even know how to replace/swap or compile this. I am going to assume it's a DD-WRT issue since its most likely modified to run in DD-WRT. Your name was listed for the ksmbd part of it in the system logs. The sure way to duplicate this. Is to run dd-wrt on a spare PC or Hard drive and connect Android or Linux box to it. Kodi isn't needed. It even shows up trying to browse shares in Linux or and Android file manager with similar messages. |
there is only one I can help you now. Can you send me wireshark(or tcpdump) file when capturing packets on problem situation ? |
As I know, ksmbd in dd-wrt is different with mainline. So the latest MacOS can not connect with ksmbd in dd-wrt, but there is no issue with mainlin ksmbd. |
Im going to close this. I believe its a DD-WRT specific issue. |
How do you know if it is dd-wrt issue ? |
Hi, I think I have the same issue with vanilla linux kernel > 6.6.10 (or near this version). Windows and MacOS clients do not have the issue. I had the issue with iOS applications (infuse - a kodi like for iOS/MacOS). I upgraded to 6.7.6, 6.7.8, 6.7.9, same issue. Conclusion : there is an issue with 3.4.2 ksmbd included since the vanilla kernel > 6.6.10 (or near this version). To workaround the issue, you have to upgrade ksmbd 3.4.9 (I only tried the latest ksmbd). The issue seems to be related to some clients only. |
@cyayon Thanks for your comment. |
So it is a DD-WRT issue for using a older version then. Sebastian Gottschall should be notified about this who makes DD-WRT to update to the 3.4.9. |
Hi, |
@cyayon I will remove ksmbd version in linux mainline. the version is not needed for mainline kernel. |
Hi, |
You have understand removing ksmbd module in mainline ? I an trying just remove module version from ksmbd. |
sorry, you're right :) |
mainline ksmbd is same with github ksmbd. dd-wrt use old source. if dd-write use the latest github ksmbd or ksmbd in mainline kernel, problem will not happen. |
Sorry, but I encounter an issue with mainline kernel (on archlinux), not dd-wrt. thanks |
Please share a link for this. I can not find it. |
6.7 version is not stable version. Please don't use 6.7.x kernel version. and I have recently updated ksmbd in the latest 6.6.x kernel. have you tried the latest 6.6.22 version ? |
I have tried 6.6.20 (latest LTS when I had the issue after upgrading archlinux - from 6.6.x to 6.7.x). The issue appears > 6.6.10 (my last know good kernel version). |
How can I reproduce it ? I should play infuse application in MacOS ? Can I reproduce your problem with linux client or windows client ? |
and I have tested kodi app against both ksmbd in linux kernel and dkms ksmbd. both ones doesn't have issue with kodi. |
I just do not touch ksmbd version in linux kernel. ksmbd source in the latest linux kernel should be same with ksmbd 3.4.9. |
I have no idea how you could do... |
@namjaejeon do you have a specific command you'd like the output from with tcpdump, ex. would this work? |
I think that this command is okay.
Yes, It would be very helpful if you give two dumpfiles to me! |
ksmbd-pcap-android.zip |
@jcadduono Thanks for your help, I will check it:) |
@jcadduono Could you please check if problem is improved when applying the following change to your kernel ?
|
@namjaejeon I can confirm it is working with my Android devices after applying this patch on Linux 6.8.1 ksmbd driver |
@jcadduono Really thanks! If you give me your real name and mail address, I will add it to the patch. e.g.
Thanks for your help! |
Cool! It is |
@jcadduono Thanks for your report! |
Sorry I wasn't much helpful with capturing on the cause. That was way out of my scope on how to do it. I am glad that I did find an real issue and it seems it was confirmed by 2 people and someone patched it. The guy who does the DD-WRT that uses this ksmbd has fixed many things and it was somewhat related on how he coded it. I wasn't very sure I was contacting the right person. |
Hello, I just upgraded to kernel 6.8.5 (archlinux distribution, which is supposed to include your patch) and test with included ksmbd module with a problematic client (Filebrowser app on macOS and iOS). The issue is always here. I used tcpdump to get a packets capture in attachment. Here is the 6.8.5 smb2ops.c link https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/fs/smb/server/smb2ops.c?h=v6.8.5 thanks. |
@cyayon Can you tell me what MacOS version is ? and can you give me wireshark dump with ksmbd 3.4.9 ? want to compare what command cause this problem ? |
Hi, |
@cyayon Hm.. I didn't find any clue when comparing packets.. Can you test https:/namjaejeon/ksmbd master branch instead of 3.4.9. because there are more patches between 3.4.9 and the latest master. |
Hi, The ksmbd included in vanilla kernel 6.8.5 do not work (like previous releases since < 6.6.10). Do you want I test latest master branch (> 3.4.9) to confirm that it do not work anymore ? Thanks |
Yes. There are patches between the latest master and 3.4.9. want to know whether these patches affect this issue.
I have updated master branch. the top of patch on maser is "ksmbd: validate request buffer size in smb2_allocate_rsp_buf()" Thanks for your help! |
Hi, it seems to work properly with this version too :
|
I don't know what dkms version of ksmbd is. I understood that it use ksmbd 3.4.9 release (https:/cifsd-team/ksmbd/releases/tag/3.4.9) |
no, it is the very last version, including your last patch : ksmbd-git-dkms-3.2.1.r3721.5f00283-1 |
@cyayon Okay... Let me check dump files you gave me. |
@cyayon Can you dump one more on 3.4.9 dkms version ? |
your last git master branch or release version 3.4.9 please? |
@cyayon It doesn't matter which of the two. |
Here is a tcpdump for the last master git version. |
@cyayon Thanks! |
@cyayon Really sorry, Can you dump one more on problem situation ? there is no clue on both dumps. So I want to re-check new dumps. |
Hi, no problem, here is a capture with stock ksmbd module included in kernel 6.8.5. |
@cyayon Thanks for your help! Can you test this patch after applying it to your 6.8.5 kernel ?
|
Hello, It seems to work as expected. |
@cyayon Thanks for your check and help! I will apply it to the mainline. And let me know if you have any issue. Thanks again! |
Running DD-WRT with this ksmbd built in. Running the latest release ksmbd according to the DD-WRT developer.
Anytime I access shares with Kodi latest version Kodi will say software caused connection to close. Or connection refused.
In the DD-WRT logs it spams this when trying to access the shared drives.
ksmbd: error while processing smb2 query dir rc = -22
This issue isn't affecting any systems running WIndows or Linux.
The text was updated successfully, but these errors were encountered: