PERFORCE change 139364 for review
Sam Leffler
sam at FreeBSD.org
Fri Apr 4 18:56:53 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=139364
Change 139364 by sam at sam_ebb on 2008/04/04 18:56:14
require parent ifnet type be IFT_IEEE80211 to avoid crashing
if handed a device that doesn't have the ieee8011com structure
install as if_softc (to be fixed correctly shortly but worth
doing regardless)
Affected files ...
.. //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#24 edit
Differences ...
==== //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#24 (text+ko) ====
@@ -45,6 +45,7 @@
#include <net/if.h>
#include <net/if_clone.h>
#include <net/if_media.h>
+#include <net/if_types.h>
#include <net/ethernet.h>
#include <net/route.h>
@@ -82,6 +83,10 @@
ifp = ifunit(cp.icp_parent);
if (ifp == NULL)
return ENXIO;
+ if (ifp->if_type != IFT_IEEE80211) {
+ if_printf(ifp, "%s: reject, not an 802.11 device\n", __func__);
+ return EINVAL;
+ }
ic = ifp->if_softc; /* XXX forces ic at front of softc */
vap = ic->ic_vap_create(ic, ifc->ifc_name, unit,
cp.icp_opmode, cp.icp_flags, cp.icp_bssid,
More information about the p4-projects
mailing list