Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jan 2025 12:42:34 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: a55197c3228c - main - if_ovpn: fix module load in NOINET6 kernels
Message-ID:  <202501301242.50UCgYkN065986@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help

The branch main has been updated by kp:

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

diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c
index 8dc90ecce725..cbcfe15dffc7 100644
--- a/sys/net/if_ovpn.c
+++ b/sys/net/if_ovpn.c
@@ -587,6 +587,7 @@ ovpn_new_peer(struct ifnet *ifp, const nvlist_t *nvl)
 
 	memcpy(&peer->remote, &remote, sizeof(remote));
 
+#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. */
@@ -594,7 +595,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501301242.50UCgYkN065986>