git: 57fcf46dee45 - main - if_ovpn: ovpn_find_peer_by_ip() is unused without INET
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 23 Feb 2023 04:58:33 UTC
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=57fcf46dee45369c5f424ce2b0b79e6b2aab0177 commit 57fcf46dee45369c5f424ce2b0b79e6b2aab0177 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2023-02-23 02:58:14 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2023-02-23 04:56:56 +0000 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,