]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
if_ovpn: fix unused functions with NOINET / NOINET6
authorKristof Provost <kp@FreeBSD.org>
Thu, 4 Aug 2022 08:13:09 +0000 (10:13 +0200)
committerKristof Provost <kp@FreeBSD.org>
Thu, 4 Aug 2022 12:00:32 +0000 (14:00 +0200)
commit8449762738b9efb72f41883b3cdf79b21da3c9cd
treed68e0a59cfd867efc1282a5fd868724c8457a032
parent5abe178970dd39cb9ca843a2b1bfe368aa3265a8
if_ovpn: fix unused functions with NOINET / NOINET6

ovpn_find_peer_by_ip() is not used if INET is not defined. Do not
define the function in that case. Same for ovpn_find_peer_by_ip6().

Fix these warnings:

/usr/src/sys/net/if_ovpn.c:1580:1: warning: unused function 'ovpn_find_peer_by_ip' [-Wunused-function]
ovpn_find_peer_by_ip(struct ovpn_softc *sc, const struct in_addr addr)
^
/usr/src/sys/net/if_ovpn.c:1599:1: warning: unused function 'ovpn_find_peer_by_ip6' [-Wunused-function]
ovpn_find_peer_by_ip6(struct ovpn_softc *sc, const struct in6_addr *addr)
^

Reported by: mjg
Sponsored by: Rubicon Communications, LLC ("Netgate")
sys/net/if_ovpn.c