git: 523548736f46 - stable/14 - if_ovpn: fix module load in NOINET6 kernels

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Thu, 13 Feb 2025 08:45:08 UTC
The branch stable/14 has been updated by kp:

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(-)

diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c
index de7920981027..6309d1f365cf 100644
--- a/sys/net/if_ovpn.c
+++ b/sys/net/if_ovpn.c
@@ -593,6 +593,7 @@ ovpn_new_peer(struct ifnet *ifp, const nvlist_t *nvl)
 	free(name, M_SONAME);
 	name = NULL;
 
+#ifdef INET6
 	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. */
@@ -600,7 +601,6 @@ ovpn_new_peer(struct ifnet *ifp, const nvlist_t *nvl)
 		in6_sin6_2_sin_in_sock((struct sockaddr *)&peer->remote);
 	}
 
-#ifdef INET6
 	if (peer->local.ss_family == AF_INET6 &&
 	    IN6_IS_ADDR_UNSPECIFIED(&TO_IN6(&peer->local)->sin6_addr)) {
 		NET_EPOCH_ENTER(et);