Skip to contentSkip to conversation

mac80211: allow interface settings changes only when down

PATCH New Johannes Berg 1 participant 1 message Sep 16, 2008 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 net/mac80211/cfg.c |    3 +++
 1 file changed, 3 insertions(+)
net/mac80211/cfg.c +3 -0
@@ -102,6 +102,9 @@ static int ieee80211_change_iface(struct
 	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,