From 57fcf46dee45369c5f424ce2b0b79e6b2aab0177 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Thu, 23 Feb 2023 03:58:14 +0100 Subject: [PATCH] if_ovpn: ovpn_find_peer_by_ip() is unused without INET Don't define ovpn_find_peer_by_ip() if INET is not set, and do the same for ovpn_find_peer_by_ip6() and INET6. Reported by: mjg Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/if_ovpn.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 169a17ec6083..bf07d23f0235 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -1663,6 +1663,7 @@ ovpn_get_af(struct mbuf *m) return (0); } +#ifdef INET static struct ovpn_kpeer * ovpn_find_peer_by_ip(struct ovpn_softc *sc, const struct in_addr addr) { @@ -1678,7 +1679,9 @@ ovpn_find_peer_by_ip(struct ovpn_softc *sc, const struct in_addr addr) return (peer); } +#endif +#ifdef INET6 static struct ovpn_kpeer * ovpn_find_peer_by_ip6(struct ovpn_softc *sc, const struct in6_addr *addr) { @@ -1694,6 +1697,7 @@ ovpn_find_peer_by_ip6(struct ovpn_softc *sc, const struct in6_addr *addr) return (peer); } +#endif static struct ovpn_kpeer * ovpn_route_peer(struct ovpn_softc *sc, struct mbuf **m0,