if_ovpn: Assert that udp_set_kernel_tunneling() succeeds

We do this elsewhere, so copy the pattern here.

Reviewed by:	kp
MFC after:	2 weeks
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D51496

(cherry picked from commit a7dfc570f2)
This commit is contained in:
Mark Johnston 2025-07-25 13:13:52 +00:00 committed by Franco Fichtner
parent a6bc9dd13b
commit 07de868fc6

View file

@ -639,6 +639,7 @@ ovpn_new_peer(struct ifnet *ifp, const nvlist_t *nvl)
* a new one.
*/
ret = udp_set_kernel_tunneling(sc->so, NULL, NULL, NULL);
MPASS(ret == 0);
sorele(sc->so);
sc->so = NULL;
}