Comment 3 for bug 1581474

Revision history for this message
Pierre Equoy (pieq) wrote :

I compiled a version of the binary with debugging symbols and I think I found the root cause of the issue.

In 80211_resource.c, we have the following:

static const char *ifmodes[] = {
 "unspecified",
 "IBSS",
 "managed",
 "AP",
 "AP_VLAN",
 "WDS",
 "monitor",
 "mesh_point",
 "P2P_client",
 "P2P_GO",
 "P2P_device",
};

ifmodes has 11 items.

However, in the nl80211.h headers used in Xenial (in package libnl-3-dev), we have this:

enum nl80211_iftype {
 NL80211_IFTYPE_UNSPECIFIED,
 NL80211_IFTYPE_ADHOC,
 NL80211_IFTYPE_STATION,
 NL80211_IFTYPE_AP,
 NL80211_IFTYPE_AP_VLAN,
 NL80211_IFTYPE_WDS,
 NL80211_IFTYPE_MONITOR,
 NL80211_IFTYPE_MESH_POINT,
 NL80211_IFTYPE_P2P_CLIENT,
 NL80211_IFTYPE_P2P_GO,
 NL80211_IFTYPE_P2P_DEVICE,
 NL80211_IFTYPE_OCB,

 /* keep last */
 NUM_NL80211_IFTYPES,
 NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
};

nl80211_iftype has more than 11 items.

On the devices where the problem happens, the program tries to reach ifmodes[NL80211_IFTYPE_OCB], which doesn't exist in our array!