drv->has_capability and GET_CAPABILITY

Dan Williams dcbw
Mon Aug 21 03:33:13 PDT 2006


wpa_supplicant_ctrl_iface_get_capability() seems to assume that an
interface that fails the capability check has _all_ capabilities.  If
the return value from wpa_drv_get_capa() is -1, then for a request for
'pairwise' the control interface will return "CCMP TKIP NONE".

In the get_capa() functions of both wext and ndis drivers, -1 is
returned from wpa_drv_get_capa() if:

	if (!drv->has_capability)
		return -1;

If drv->has_capability is 0, that usually means that wpa_supplicant
couldn't determine what the capabilities of the interface are, or the
driver is old.  The wext driver only sets has_capability if the driver
is WE-18 or later.  If my reading is right, any driver compiled for WE <
18 will report through the control interface that it supports WPA.  Is
that correct?

It seems that if wpa_supplicant cannot determine what capabilities the
interface supports, it reports support for all capabilities.  That seems
broken to me, but probably was added as a kludge to allow older,
non-standard drivers to use WPA even though they did not report
capabilities correctly, or for pre-WE WPA support.  The problem I have
is that I cannot rely on wpa_supplicant to reliably report what the
capabilities for an interface are then.

What I'd like to do in the dbus control interface is diverge from the
socket/UDP control interface and be more conservative in reporting
capabilities.  But then the interfaces differ.  Does that sound fine?


More information about the Hostap mailing list