aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2013-01-23 15:15:57 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-01-24 16:05:30 +0100
commit683d41ae6755e6ae297ec09603c229795ab9566e (patch)
tree528f940800257f790c98cac635af0f622e0c1a1c /net
parentf68d776a04bfcebc426f605c4440ffe38c583a4b (diff)
cfg80211: fix channel check in cfg80211_can_use_iftype_chan
In commit "cfg80211: check radar interface combinations" a regression was introduced which might lead to NULL dereference if the argument chan = NULL, which might happen in IBSS/wext case (and probably others). Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 1c2795d52db..d7873c7ae0e 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1212,7 +1212,8 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev,
case NL80211_IFTYPE_MESH_POINT:
case NL80211_IFTYPE_P2P_GO:
case NL80211_IFTYPE_WDS:
- radar_required = !!(chan->flags & IEEE80211_CHAN_RADAR);
+ radar_required = !!(chan &&
+ (chan->flags & IEEE80211_CHAN_RADAR));
break;
case NL80211_IFTYPE_P2P_CLIENT:
case NL80211_IFTYPE_STATION: