-
Notifications
You must be signed in to change notification settings - Fork 25
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
qca-nss-ecm: causes some network problems #6
Comments
I had similar issues and solved it by disabling TCP Segmentation Offload on all ethernet ports. Try putting this in your /etc/rc.local (or via Luci System->Startup->Local Startup:
and reenable qca-nss-ecm, which gives you back NSS offloading. |
@derekw36 thanks for tip edit: your suggestion didn't work |
Hi guys, Thanks for reporting this, actually it's a much older issue that I've been tracking down for a while. I first saw these SSL/TLS corruption issues months ago on the 5.15 codebase, only happening on the wired / Ethernet ports of course (why does Wi-Fi work - is it because it's not offloaded by NSS?):
I've been debugging it behind the scenes with @AgustinLorenzo's help, that's why we recently bumped all the QCA NSS modules (ECM, SSDK, DP etc.) to 12.3r2, hoping it'd fix it. Software offloading doesn't seem to influence it at all, I've tried many different scenarios. So far, my findings indicate an issue with the MTU configured for the wired interfaces, as you can see in the debug logs I pasted above, bytes are overlapping. I also had this behaviour on the stock firmware when using VLANs / bridged networks, I had to lower the MTU to 1492 to fix it, both on the client and the router interface. It might be related to NSS DP or the internal switch also, something hardcoded? Could also depend on your client OS network config. I also use WireGuard tunnels (with MTUs != 1500) and mwan3 / policy-based routing, which could interfere. I just pushed openwrt/packages#20923 in my own local packages repo and also a new version of openwrt/openwrt#12112 I'll test these changes and debug more. If you find a more robust fix, please do post it here! |
@bitthief I got same problem but different results I don't get errors with curl it just stuck in the end first time i did face the problem than my first indicate was mtu too my guess mtu value causes problem the different way or mss acting weird when nss offloading enabled but if i can debug nss i can help because my problem started with this 8b673c also i captured network traffic i noticed in wireshark there are many "tcp segment of a reassembled pdu" with length 1462 |
So I had some time to play with this and I have a partial hack/workaround for now. @derekw36 was definitely on the right track, the bug appears to be triggered by the interface offload (TCP? GSO? others?). I have been using a script to disable ALL the offloads for all the interfaces and it fixes the issue instantly. No reboots necessary or even restarting ECM etc. Please look at commit e4447f3 Just running the disable_offloads.sh script should be enough once the device is booted (or just place it in /etc/rc.local with a sleep before). I also wrote a hotplug script, but it doesn't appear to trigger on my device, I think I missed something there and it needs to be debugged (this would allow automatic activation, controlled by options in the ECM config file. More than happy to look at any other suggestions / ideas / fixes etc. related to this. |
@bitthief at the beginning i didn't tell i was using some custom sysctl variables so those settings may affect the problem maybe software offloading did the trick after all those you may wanna look into or anyone can test with
|
Hi,
after your latest commits i can't download some files and can't git clone some repos
for example
wget https://downloads.sourceforge.net/lzmautils/xz-5.4.2.tar.bz2 ( download hit to %99 than goes to endless loop)
https://github.com/bitthief/openwrt.git when i try cloning your repo stucks at some random number of percent
workaround : /etc/init.d/qca-nss-ecm stop than everything works fine
last working version : OpenWrt SNAPSHOT r22494-49348d7178 / LuCI Master git-23.074.82619-6ad6a24
build date: 31.03.2023 / kernel: 5.15.104
The text was updated successfully, but these errors were encountered: