I am getting wiregaurd kernel module crash while wg0 interface bring up itself. I belive my issue is because of the linux kernel versions (4.4 and 5.4 ) compatability problem. If my understanding is wrong please correct me. If its true any patch work or any work around for this issue..?
Below is my packages versioning information and issue logs from my openwrt router.
Openwrt-19.07 (linux v4.4):
Tried below different packages as well.
Wiregurd tools: (User Space - wg )
20210223
20191226
20210424
What device is this and how have you patched in kernel 5.4 into 19.07? ==> I am using SDK ( kernel v5.4) which has our some firmware related ( target - ipq807x). 19.07 wiregaurd packages are not able to work with that.
Is there a reason to not upgrade to 22.01? ==> Currently have many firmware depencies on this. Hence not moving to latest 22.01
Is there any approach/patch these(19.07 v4.4) wiregaurd tools and wiregaurd kernel module to make compatiable with ( v5.4 kernel) ..?
All of the wireguard-linux-compat versions you listed are old. The latest, as of writing, is v1.0.20220627. So maybe try that, and if it doesn't work, send an email to the wireguard mailing list.
I've taken the liberty to clarify your topic title. The ipq807x target is unsupported on OpenWrt proper, there is development on it, but it is not in even in master yet, much less in 19.07.
Thanks much for the update. Hope will get update as soon as some progress on it. Yeah sure will get help from the Qualcomm people on this particular issue.
I have found RCA for the issue. That is NULL check is missing in latest 5.4 kernel which is properly handled in 4.4 kernel function netif_is_vxlan(in_dev)). This could happen when trying to send out packets before interface update in the kernel interfaces look up structure (init_net). After adding NULL checking crash is not seen. Correct me if i am understanding wrong ..?
Below is the difference for the crash function netif_is_vxlan in 5.4 s 4.4 kernel :