Merge ~pieq/plainbox-provider-resource:fix_1581474 into plainbox-provider-resource:master
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Sylvain Pineau | ||||
Approved revision: | 977680232f086658b076bcf805953bf8e2c7f026 | ||||
Merged at revision: | a54d2f5e208e0dac01f2eb0e3d008152f75b2cd1 | ||||
Proposed branch: | ~pieq/plainbox-provider-resource:fix_1581474 | ||||
Merge into: | plainbox-provider-resource:master | ||||
Diff against target: |
12 lines (+1/-0) 1 file modified
src/80211_resource.c (+1/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sylvain Pineau (community) | Approve | ||
Review via email: mp+308787@code.launchpad.net |
Description of the change
In recent nl80211.h headers used in Xenial and Trusty (in package libnl-3-dev),
we have this:
enum nl80211_iftype {
NL80211_
NL80211_
NL80211_
NL80211_IFTYPE_AP,
NL80211_
NL80211_
NL80211_
NL80211_
NL80211_
NL80211_
NL80211_
NL80211_
/* keep last */
NUM_NL80211_
NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
};
NL80211_IFTYPE_OCB is new and means "Outside Context of a BSS".
On some devices, our program tries to access ifmodes[
which doesn't exist...
Before this fix is applied, when running the program on the test device:
-------
$ ./80211_resource
IBSS: supported
managed: supported
AP: supported
AP_VLAN: supported
WDS: supported
monitor: supported
mesh_point: supported
P2P_client: supported
P2P_GO: supported
Segmentation fault (core dumped)
-------
After:
-------
$ ./80211_resource
IBSS: supported
managed: supported
AP: supported
AP_VLAN: supported
WDS: supported
monitor: supported
mesh_point: supported
P2P_client: supported
P2P_GO: supported
outside_
n: supported
bg: supported
-------
This patch has been tested on both Trusty and Xenial.
What a good gdb session, well done. +1