mirror of
https://github.com/opnsense/src.git
synced 2026-02-22 01:11:30 -05:00
Originally, wtap_node_write() gets the wrong softc by iterating V_inet and gets the ifp by string comparison, then gets softc by ifp->if_softc. However, ifp->if_softc will not point to the correct softc owned by ieee80211com, and thus causes a kernel panic. Fix it by assigning softc to cdev's si_drv1 in wtap_vap_create() and get the softc directly via dev->si_drv1 in wtap_node_write(). The cdev created by wtap_vap_create() use the name of ieee80211com rather than the vap's name. It will cause the second vap based on the same ieee80211com as first vap fail to create a device node because the device node is already exists. Fix it by assigning vap->iv_ifp->if_xname to cdev's name. Sponsored by: Google, Inc. (GSoC 2022) Reviewed by: adrian, cy, bz Differential Revision: https://reviews.freebsd.org/D35752 |
||
|---|---|---|
| .. | ||
| plugins | ||
| wtap_hal | ||
| if_medium.c | ||
| if_medium.h | ||
| if_wtap.c | ||
| if_wtap_module.c | ||
| if_wtapioctl.h | ||
| if_wtapvar.h | ||