git: 4cd4fc06c2bf - stable/14 - wg: fix the LINT-NOIP build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 24 Oct 2026 01:18:27 UTC
The branch stable/14 has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=4cd4fc06c2bf797aed44c320f2678102df4518b5
commit 4cd4fc06c2bf797aed44c320f2678102df4518b5
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2026-10-20 14:34:03 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2026-10-23 02:56:54 +0000
wg: fix the LINT-NOIP build
We don't have anything to tunnel without INET or INET6, so just smack
it with the same config(5) hammer that ovpn uses and exclude it from
such builds.
Reported by: mjg
Reviewed by: emaste, markj
(cherry picked from commit 8430de47aa7c004e1330b8f6a3018c360425606e)
---
sys/conf/files | 8 ++++----
sys/dev/wg/if_wg.c | 2 --
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/sys/conf/files b/sys/conf/files
index b5270cf286ce..2bbcedcb09a1 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -3443,13 +3443,13 @@ dev/vt/vt_font.c optional vt
dev/vt/vt_sysmouse.c optional vt
dev/vte/if_vte.c optional vte pci
dev/watchdog/watchdog.c standard
-dev/wg/if_wg.c optional wg \
+dev/wg/if_wg.c optional wg inet | wg inet6 \
compile-with "${NORMAL_C} -include $S/dev/wg/compat.h"
-dev/wg/wg_cookie.c optional wg \
+dev/wg/wg_cookie.c optional wg inet | wg inet6 \
compile-with "${NORMAL_C} -include $S/dev/wg/compat.h"
-dev/wg/wg_crypto.c optional wg \
+dev/wg/wg_crypto.c optional wg inet | wg inet6 \
compile-with "${NORMAL_C} -include $S/dev/wg/compat.h"
-dev/wg/wg_noise.c optional wg \
+dev/wg/wg_noise.c optional wg inet | wg inet6 \
compile-with "${NORMAL_C} -include $S/dev/wg/compat.h"
dev/wpi/if_wpi.c optional wpi pci
wpifw.c optional wpifw \
diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c
index 75af5e279669..73846c7db234 100644
--- a/sys/dev/wg/if_wg.c
+++ b/sys/dev/wg/if_wg.c
@@ -532,12 +532,10 @@ wg_peer_get_endpoint(struct wg_peer *peer, struct wg_endpoint *e)
static int
wg_aip_addrinfo(struct wg_aip *aip, const void *baddr, uint8_t cidr)
{
-#if defined(INET) || defined(INET6)
struct aip_addr *addr, *mask;
addr = &aip->a_addr;
mask = &aip->a_mask;
-#endif
switch (aip->a_af) {
#ifdef INET
case AF_INET: