make tun_link_state take the ifnet pointer instead of tun_softc.
authordlg <dlg@openbsd.org>
Tue, 15 Feb 2022 04:16:10 +0000 (04:16 +0000)
committerdlg <dlg@openbsd.org>
Tue, 15 Feb 2022 04:16:10 +0000 (04:16 +0000)
commit0e8c468fbbaf5f75e94add8e20a42311e5ac937c
treec376aea66ad964c774455fb1302a41f6e87b8e16
parentc562e85afa8cdeae5253e959d1e366f99ef15ac1
make tun_link_state take the ifnet pointer instead of tun_softc.

it only works on struct ifnet data, so passing ifp makes it clearer
what's actually being manipulated. also fix tun_dev_open so
tun_link_state is called before if_put instead of immediately after.
sys/net/if_tun.c