git: 30b70876207d - stable/15 - wg: fix the LINT-NOIP build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 24 Oct 2026 01:18:05 UTC
The branch stable/15 has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=30b70876207dd874228693c9700d77c6630cb69a
commit 30b70876207dd874228693c9700d77c6630cb69a
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2026-10-20 14:34:03 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2026-10-24 01:17:43 +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 b520e4e39026..f2d19990db71 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -3550,13 +3550,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 17aedee0e6b0..6ad3c44dc8ff 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: