[GH-ISSUE #266] build failure on Ubuntu 26.04.1 #145

Open
opened 2026-10-13 21:07:01 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @ExCyb on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/266

Ubuntu 26.04.1 LTS, kernel 7.0.0-38
error because of compat/compat.h
Look at lines about 1450

#if LINUX_VERSION_CODE < KERNEL_VERSION(7, 1, 5)
#include <net/udp_tunnel.h>
#define setup_udp_tunnel_sock(net, sk, sock_cfg) setup_udp_tunnel_sock(net, sk->sk_socket, sock_cfg)
#define udp_tunnel_sock_release(sk) udp_tunnel_sock_release(sk->sk_socket)
#endif

First define is not needed with the kernel. It has already new interface. So build fails with the define and passes if I comment it. Second one is needed.
I think it should be something like the next one here

#if LINUX_VERSION_CODE < KERNEL_VERSION(7, 1, 5)
#include <net/udp_tunnel.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(7, 0, 0)
#define setup_udp_tunnel_sock(net, sk, sock_cfg) setup_udp_tunnel_sock(net, sk->sk_socket, sock_cfg)
#endif
#define udp_tunnel_sock_release(sk) udp_tunnel_sock_release(sk->sk_socket)
#endif
Originally created by @ExCyb on GitHub (Oct 8, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/266 Ubuntu 26.04.1 LTS, kernel 7.0.0-38 error because of compat/compat.h Look at lines about 1450 ``` #if LINUX_VERSION_CODE < KERNEL_VERSION(7, 1, 5) #include <net/udp_tunnel.h> #define setup_udp_tunnel_sock(net, sk, sock_cfg) setup_udp_tunnel_sock(net, sk->sk_socket, sock_cfg) #define udp_tunnel_sock_release(sk) udp_tunnel_sock_release(sk->sk_socket) #endif ``` First define is not needed with the kernel. It has already new interface. So build fails with the define and passes if I comment it. Second one is needed. I think it should be something like the next one here ``` #if LINUX_VERSION_CODE < KERNEL_VERSION(7, 1, 5) #include <net/udp_tunnel.h> #if LINUX_VERSION_CODE < KERNEL_VERSION(7, 0, 0) #define setup_udp_tunnel_sock(net, sk, sock_cfg) setup_udp_tunnel_sock(net, sk->sk_socket, sock_cfg) #endif #define udp_tunnel_sock_release(sk) udp_tunnel_sock_release(sk->sk_socket) #endif ```
Author
Owner

@CptTZ commented on GitHub (Oct 8, 2026):

Dup of #259 - you can try pull my fix #262

<!-- gh-comment-id:6067042740 --> @CptTZ commented on GitHub (Oct 8, 2026): Dup of #259 - you can try pull my fix #262
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-linux-kernel-module#145
No description provided.