Skip to content
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

udm-4.19.152 Kernel (from UDM 4.2.27 GPL) #80

Closed
mcpat-it opened this issue Mar 1, 2023 · 13 comments
Closed

udm-4.19.152 Kernel (from UDM 4.2.27 GPL) #80

mcpat-it opened this issue Mar 1, 2023 · 13 comments

Comments

@mcpat-it
Copy link
Contributor

mcpat-it commented Mar 1, 2023

Hi @peacey and @tusc

just received the new kernel for UDM
Linux UDM 4.19.152-ui-alpine-udm #4.19.152 SMP Thu Jan 19 14:13:28 CST 2023 aarch64 GNU/Linux

linux-arm64-dream-udm-4.19.152-ui-alpine-udm.tar.gz.

Cheers
Patrick

@mcpat-it mcpat-it changed the title udm-4.19.152 Kernel udm-4.19.152 Kernel (from UDM 4.2.27 GPL) Mar 1, 2023
@peacey
Copy link
Collaborator

peacey commented Mar 1, 2023

Thanks @pwallner!! I'll try to compile the latest module with these sources and tell you how it goes. Would be nice to have an updated version of the wireguard module.

peacey added a commit that referenced this issue Mar 2, 2023
Thanks to @pwallner for obtaining the kernel sources from Ubiquiti (#80)
@peacey
Copy link
Collaborator

peacey commented Mar 2, 2023

Thanks again @pwallner. I was able to successfully compile the module with these sources, and I've tested it on UDM 2.5 and the externally compiled module works well (version 1.0.20220627)! You can check out the latest release and try it out yourself (attn: @bluewalk).

Though one small issue, which isn't new, is that the external module breaks Teleport (there is a workaround I'm using to fix it, but it's not ideal). Do you have the full GPL sources and not just the kernel sources? I want to see if there are any hints or patches to what changes they made to the wireguard module to make it work with Teleport. So I would appreciate if you are able to link the full GPL sources! Thanks!

@mcpat-it
Copy link
Contributor Author

mcpat-it commented Mar 2, 2023

@peacey Great!!! I will try it today, yesterday I was busy to provide everything on my UDM for nfs and cifs...

Didn't realized that Teleport breaks by the external module, hopefully you find the cause...
Yes I have the full GPL source, here we go UDM-2.4.27-GPL.tar.gz or UDM-2.4.27-GPL.tar.gz

@bluewalk
Copy link

bluewalk commented Mar 2, 2023

Great work ya’ll, I will give it a shot and report back when I get home this weekend 👍🏻

@mcpat-it
Copy link
Contributor Author

mcpat-it commented Mar 2, 2023

@peacey I think prefix is wrong, should be 4.19.152-ui-alpine-udm

dmesg output (I compiled wrong with only 4.19.1.52) when trying loading cifs

[886518.442167] cifs: version magic '4.19.152 SMP mod_unload aarch64' should be '4.19.152-ui-alpine-udm SMP mod_unload aarch64'

@peacey
Copy link
Collaborator

peacey commented Mar 2, 2023

@pwallner, on my UDM Pro 2.5, prefix is only 4.19.152-ui-alpine so that's what I compiled with and the module loaded successfully, as you can see from dmesg output:

[745390.038470] wireguard: WireGuard 1.0.20220627 loaded. See www.wireguard.com for information.
[745390.038473] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.

What UDM model and software version are you running that the suffix is -udm at the end? Can you show me the output of uname -a? Here's mine.

Linux UDM-Pro 4.19.152-ui-alpine #4.19.152 SMP Mon Feb 13 17:22:39 CST 2023 aarch64 GNU/Linux

As you can see, the suffix is only -ui-alpine here.

@mcpat-it
Copy link
Contributor Author

mcpat-it commented Mar 2, 2023

@peacey see first post, I have an normal UDM and with uname I receive the udm at the end...

Firmware 2.4.27

@peacey
Copy link
Collaborator

peacey commented Mar 2, 2023

Hey @pwallner,

Thanks for that info, I was not aware udm used a different suffix. Anyhow I compiled it for both now and re-released it. Try out the latest release again.

Also, thank you for the full GPL sources. Ubiquiti does indeed have some custom wireguard patches and once I added them to the build, teleport works fine now! So that's fixed now with the custom module.

@bluewalk, the custom patches explains why the Ubiquiti module was giving you trouble but the one from this project wasn't. But it doesn't seem like you encountered any issues with the 2.4 built-in module, so hopefully they fixed that problem in their patches. Please test the latest release and see if you run into any issues with that same problem.

@bluewalk
Copy link

bluewalk commented Mar 3, 2023

@bluewalk, the custom patches explains why the Ubiquiti module was giving you trouble but the one from this project wasn't. But it doesn't seem like you encountered any issues with the 2.4 built-in module, so hopefully they fixed that problem in their patches. Please test the latest release and see if you run into any issues with that same problem.

It seems their patch is indeed the thing that's causing the following error (no kernel panic yet though) 😀

[747567.960291] wireguard: vpn0: possible loop detected, dropping skb of size 65216
[747569.286610] wireguard: vpn0: possible loop detected, dropping skb of size 65216
[747570.685233] wireguard: vpn0: possible loop detected, dropping skb of size 65216
[747575.765200] wireguard: vpn0: possible loop detected, dropping skb of size 65216

as seen here https://github.com/tusc/wireguard-kmod/blob/main/src/bases/udm-2.4/patches/wireguard-linux-compat/041-ubnt-protection-from-routing-loops.patch
No idea why they chose for this check though...

@mcpat-it
Copy link
Contributor Author

mcpat-it commented Mar 6, 2023

@peacey can confirm it works now! Thx!

@peacey
Copy link
Collaborator

peacey commented Mar 6, 2023

@bluewalk Ya I'm not sure what routing loops this is supposed to fix, but as long as it doesn't give you issues, let's keep it that way. If you ever get kernel panics again because of this, I can always compile the non-patched versions that are not compatible with Teleport for you.

@peacey
Copy link
Collaborator

peacey commented Mar 6, 2023

Good to hear that @pwallner! Thanks for all the new GPL files again. It would be great if you can keep requesting them once they update to 3.0! That would be really helpful.

I'll close this issue now since it's completed. Have a great day!

@peacey peacey closed this as completed Mar 6, 2023
@mcpat-it
Copy link
Contributor Author

@peacey Just to inform you, I just updated my UDM to latest version 2.5.17, now the "-udm" disappeared from uname. So now my UDM acts like your UDM-Pro....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants