git: 26ef5e9e234f - main - if_ovpn: Remove a no-op function
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 25 Jul 2025 17:39:19 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=26ef5e9e234f1d1729dd43b15d1e591e479f1816
commit 26ef5e9e234f1d1729dd43b15d1e591e479f1816
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-07-25 13:14:08 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-07-25 17:39:01 +0000
if_ovpn: Remove a no-op function
ovpn used to maintain one socket ref per peer. This scheme was changed
in commit 3acf7e0da487 ("if_ovpn: avoid LOR between ovpn and UDP
locks"), which turned ovpn_rele_so() in a no-op. Just remove the whole
function and a related helper, as the remaining assertion there isn't
useful.
No functional change intended.
Reviewed by: kp
MFC after: 2 weeks
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D51497
---
sys/net/if_ovpn.c | 29 -----------------------------
1 file changed, 29 deletions(-)
diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c
index 67530281eefa..d3ee1654ce82 100644
--- a/sys/net/if_ovpn.c
+++ b/sys/net/if_ovpn.c
@@ -372,33 +372,6 @@ ovpn_nvlist_to_sockaddr(const nvlist_t *nvl, struct sockaddr_storage *sa)
return (0);
}
-static bool
-ovpn_has_peers(struct ovpn_softc *sc)
-{
- OVPN_ASSERT(sc);
-
- return (sc->peercount > 0);
-}
-
-static void
-ovpn_rele_so(struct ovpn_softc *sc)
-{
- bool has_peers;
-
- OVPN_WASSERT(sc);
-
- if (sc->so == NULL)
- return;
-
- has_peers = ovpn_has_peers(sc);
-
- if (! has_peers) {
- MPASS(sc->peercount == 0);
- } else {
- MPASS(sc->peercount > 0);
- }
-}
-
static void
ovpn_notify_del_peer(struct ovpn_softc *sc, struct ovpn_kpeer *peer)
{
@@ -487,8 +460,6 @@ ovpn_peer_release_ref(struct ovpn_kpeer *peer, bool locked)
ovpn_free_kkey_dir(peer->keys[i].decrypt);
}
- ovpn_rele_so(sc);
-
callout_stop(&peer->ping_send);
callout_stop(&peer->ping_rcv);
uma_zfree_pcpu(pcpu_zone_4, peer->last_active);