Explorar o código

mac80211: allow interface settings changes only when down

We currently allow monitor flags changes and mesh ID changes when
the interface is up, which can lead to trouble. Change it to only
allow when down.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg %!s(int64=17) %!d(string=hai) anos
pai
achega
f8b25cdad7
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      net/mac80211/cfg.c

+ 3 - 0
net/mac80211/cfg.c

@@ -100,6 +100,9 @@ static int ieee80211_change_iface(struct wiphy *wiphy, int ifindex,
 	if (ret)
 		return ret;
 
+	if (netif_running(sdata->dev))
+		return -EBUSY;
+
 	if (ieee80211_vif_is_mesh(&sdata->vif) && params->mesh_id_len)
 		ieee80211_sdata_set_mesh_id(sdata,
 					    params->mesh_id_len,