Skip to content

Commit

Permalink
if_ovpn: fix module load in NOINET6 kernels
Browse files Browse the repository at this point in the history
PR:		284459
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
  • Loading branch information
kprovost committed Jan 30, 2025
1 parent 36d7d20 commit a55197c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/net/if_ovpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,14 +587,14 @@ 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. */
in6_sin6_2_sin_in_sock((struct sockaddr *)&peer->local);
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);
Expand Down

0 comments on commit a55197c

Please sign in to comment.