mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-13 21:34:34 +00:00
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#267
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?
📋 Pull Request Information
Original PR: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/265
Author: @CptTZ
Created: 10/5/2026
Status: 🔄 Open
Base:
master← Head:master📝 Commits (1)
2560c48compat: detect udp_tunnel sock/socket signatures instead of gating on kernel version (#259)📊 Changes
1 file changed (+22 additions, -4 deletions)
View changed files
📝
src/compat/compat.h(+22 -4)📄 Description
Problem
Linux 7.1.5 changed
setup_udp_tunnel_sock()andudp_tunnel_sock_release()to takestruct sock *instead ofstruct socket *. compat.h handled that with a singleLINUX_VERSION_CODE < 7.1.5gate that wraps both calls in->sk_socket.Ubuntu 7.0.0-38 (aka. 26.04) backported only the
setup_udp_tunnel_sockhalf.udp_tunnel_sock_releasestill takesstruct socket *there, andLINUX_VERSION_CODEstays at 7.0.14. So the gate fires, the setup call getssk->sk_socket, and the build fails:note - could also be an Ubuntu issue
setup_udp_tunnel_sockudp_tunnel_sock_releaseLINUX_VERSION_CODEstruct socket *struct socket *struct sock *struct socket *struct sock *struct sock *Fix
Drop the gate using gcc built-in compat helpers
__builtin_types_compatible_pand__builtin_choose_expr, also ref #262.The pre-3.18 fallbacks in
compat/udp_tunnel/declare thestruct socket *variants, so they keep working through the same check.Testing
Built on Ubuntu 26.04.1 with gcc 15.2, no errors or warnings:
7.0.0-38-genericheaders (setup=sock, release=socket), previously failing7.0.0-34-genericheaders (bothsocket)Not tested: a 7.1.5+ kernel.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.