Skip to content

Commit

Permalink
cfg80211: fix checking nl80211_send_station() return value
Browse files Browse the repository at this point in the history
The return value from nl80211_send_station() is the length of the
skb, or a negative error, so abort sending the message only when
the return value was negative.

This fixes the ibss_rsn wpa_supplicant test case.

Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Jan 16, 2015
1 parent 5e06a9e commit 5700712
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -11788,7 +11788,7 @@ void cfg80211_del_sta_sinfo(struct net_device *dev, const u8 *mac_addr,
return;

if (nl80211_send_station(msg, NL80211_CMD_DEL_STATION, 0, 0, 0,
rdev, dev, mac_addr, sinfo)) {
rdev, dev, mac_addr, sinfo) < 0) {
nlmsg_free(msg);
return;
}
Expand Down

0 comments on commit 5700712

Please sign in to comment.