[PR #185] [CLOSED] fix: ipv6_stub usage for kernel 7.x #226

Closed
opened 2026-10-13 21:07:47 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/185
Author: @AlexaFrom
Created: 7/8/2026
Status: ❌ Closed

Base: master ← Head: master


📝 Commits (2)

  • 60c1bd0 socket.h: add forward declarations for kernel 7.x
  • 40b04a8 socket.c: replace ipv6_stub with ip6_dst_lookup_flow

📊 Changes

2 files changed (+6 additions, -2 deletions)

View changed files

📝 src/socket.c (+2 -2)
📝 src/socket.h (+4 -0)

📄 Description

Problem

On Linux kernels version 7.x and newer, the amneziawg-dkms module fails to build because the ipv6_stub symbol has been removed from the public API. This results in the compilation error ipv6_stub undeclared in socket.c.

What fixed

  1. Replaced the deprecated ipv6_stub->ipv6_dst_lookup_flow call in socket.c with a direct call to ip6_dst_lookup_flow, which is available when CONFIG_IPV6=y.
  2. Added #include <net/ip6_route.h> to ensure the function is properly declared.
  3. Added forward declarations for struct wg_device, struct wg_peer, and struct endpoint in socket.h to resolve type conflicts that occurred after the change.

Testing

  • Kernel: 7.1.3-zen1-1-zen (Arch Linux)
  • CONFIG_IPV6=y
  • Build completed successfully; the module loads and the awg-quick interface comes up without errors.

#free_internet_for_everyone


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/185 **Author:** [@AlexaFrom](https://github.com/AlexaFrom) **Created:** 7/8/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`60c1bd0`](https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/commit/60c1bd0105246bbd309e5148f1399ac41c8ffd9f) socket.h: add forward declarations for kernel 7.x - [`40b04a8`](https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/commit/40b04a8d43f1e24ed6e495a5a97c05883ab1d122) socket.c: replace ipv6_stub with ip6_dst_lookup_flow ### 📊 Changes **2 files changed** (+6 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/socket.c` (+2 -2) 📝 `src/socket.h` (+4 -0) </details> ### 📄 Description ### Problem On Linux kernels version 7.x and newer, the amneziawg-dkms module fails to build because the `ipv6_stub` symbol has been removed from the public API. This results in the compilation error `ipv6_stub undeclared` in `socket.c`. ### What fixed 1. Replaced the deprecated `ipv6_stub->ipv6_dst_lookup_flow` call in `socket.c` with a direct call to `ip6_dst_lookup_flow`, which is available when `CONFIG_IPV6=y`. 2. Added `#include <net/ip6_route.h>` to ensure the function is properly declared. 3. Added forward declarations for `struct wg_device`, `struct wg_peer`, and `struct endpoint` in `socket.h` to resolve type conflicts that occurred after the change. ### Testing - Kernel: `7.1.3-zen1-1-zen` (Arch Linux) - `CONFIG_IPV6=y` - Build completed successfully; the module loads and the `awg-quick` interface comes up without errors. #free_internet_for_everyone --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 21:07:47 +00:00
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#226
No description provided.