mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-13 21:34:34 +00:00
[GH-ISSUE #193] v1.0.20260611 fails to build with 7.1.5 gentoo kernel sources (module version is from sorrow overlay) #113
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amneziawg-linux-kernel-module#113
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @arboretumfess on GitHub (Jul 25, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/193
built no problem with 7.1.4...
socket.c: In function ‘sock_free’:
socket.c:344:37: error: passing argument 1 of ‘udp_tunnel_sock_release’ from incompatible pointer type [-Wincompatible-pointer-types]
344 | udp_tunnel_sock_release(sock->sk_socket);
| ~~~~^~~~~~~~~~~
| |
| struct socket *
In file included from socket.c:17:
/usr/src/linux-7.1.5-gentoo/include/net/udp_tunnel.h:179:43: note: expected ‘struct sock *’ but argument is of type ‘struct socket *’
179 | void udp_tunnel_sock_release(struct sock *sk);
| ~~~~~~~~~~~~~^~
socket.c: In function ‘wg_socket_init’:
socket.c:398:36: error: passing argument 2 of ‘setup_udp_tunnel_sock’ from incompatible pointer type [-Wincompatible-pointer-types]
398 | setup_udp_tunnel_sock(net, new4, &cfg);
| ^~~~
| |
| struct socket *
/usr/src/linux-7.1.5-gentoo/include/net/udp_tunnel.h:97:58: note: expected ‘struct sock *’ but argument is of type ‘struct socket *’
97 | void setup_udp_tunnel_sock(struct net *net, struct sock *sk,
| ~~~~~~~~~~~~~^~
socket.c:405:49: error: passing argument 1 of ‘udp_tunnel_sock_release’ from incompatible pointer type [-Wincompatible-pointer-types]
405 | udp_tunnel_sock_release(new4);
| ^~~~
| |
| struct socket *
/usr/src/linux-7.1.5-gentoo/include/net/udp_tunnel.h:179:43: note: expected ‘struct sock *’ but argument is of type ‘struct socket *’
179 | void udp_tunnel_sock_release(struct sock *sk);
| ~~~~~~~~~~~~~^~
socket.c:413:44: error: passing argument 2 of ‘setup_udp_tunnel_sock’ from incompatible pointer type [-Wincompatible-pointer-types]
413 | setup_udp_tunnel_sock(net, new6, &cfg);
| ^~~~
| |
| struct socket *
/usr/src/linux-7.1.5-gentoo/include/net/udp_tunnel.h:97:58: note: expected ‘struct sock *’ but argument is of type ‘struct socket *’
97 | void setup_udp_tunnel_sock(struct net *net, struct sock *sk,
| ~~~~~~~~~~~~~^~
make[4]: *** [/usr/src/linux-7.1.5-gentoo/scripts/Makefile.build:289: socket.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [/usr/src/linux-7.1.5-gentoo/Makefile:2162: .] Error 2
make[2]: *** [/usr/src/linux-7.1.5-gentoo/Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/var/tmp/portage/net-vpn/amneziawg-module-1.0.20260611-r1/work/amneziawg-linux-kernel-module-1.0.20260611/src'
make[1]: *** [Makefile:248: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-7.1.5-gentoo'
make: *** [Makefile:27: module] Error 2
@arboretumfess commented on GitHub (Jul 25, 2026):
Made and attached a patch that makes it build with 7.1.5. (Problem was that certain functions in kernel now take sock struct instead of socket)
715.patch
@AdB0kaT commented on GitHub (Jul 26, 2026):
After this patch, the module stops building on other kernel (
@Mr-Larkspur commented on GitHub (Jul 26, 2026):
Got a similar problem. DKMS failed to rebuild on arch kernel update to 7.1.5
I suck at debugging, so here's something that came from ChatGPT. Please discard if it's genuinely unhelpful.
"The key issue is here:
expected ‘struct sock *’
but argument is of type ‘struct socket *’
AmneziaWG's source is doing things like:
setup_udp_tunnel_sock(net, new4, &cfg);
where new4 is a struct socket *.
But your new kernel's API now expects:
setup_udp_tunnel_sock(net, struct sock *, ...)
Those are different kernel structures. Similarly:
udp_tunnel_sock_release(sock->sk_socket);
is passing a struct socket * where the kernel now expects a struct sock *."