A kernel compiled without IPv6 support does cannot load if_ovpn.ko as it requires does not cater of IPv6 mapped addresses from IPv4. Specifically, these lines are not defined for only INET6 support, which causes the error. if (peer->local.ss_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&TO_IN6(&peer->remote)->sin6_addr)) { /* V4 mapped address, so treat this as v4, not v6. */ in6_sin6_2_sin_in_sock((struct sockaddr *)&peer->local); in6_sin6_2_sin_in_sock((struct sockaddr *)&peer->remote); } My suggestion is to move the #ifdef INET6 before this logic. Note: This issue is also present on the main branch.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=a55197c3228cd015ebc8218afbc938ef09191a98 commit a55197c3228cd015ebc8218afbc938ef09191a98 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2025-01-30 11:06:19 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2025-01-30 11:07:15 +0000 if_ovpn: fix module load in NOINET6 kernels PR: 284459 MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") sys/net/if_ovpn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=523548736f46bfcb307846e12dc9a890fa02f327 commit 523548736f46bfcb307846e12dc9a890fa02f327 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2025-01-30 11:06:19 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2025-02-13 08:44:58 +0000 if_ovpn: fix module load in NOINET6 kernels PR: 284459 MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") sys/net/if_ovpn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)