From: Johannes Berg Date: Thu, 24 Apr 2008 12:16:36 +0000 (+0200) Subject: mac80211: don't allow invalid WDS peer addresses X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e94e106831403d5028e7bb73c3163951134de1ba;p=linux-beck.git mac80211: don't allow invalid WDS peer addresses Rather than just disallowing the zero address, disallow all invalid ones. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/net/mac80211/main.c b/net/mac80211/main.c index e12ffa172813..ab952fff1811 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -255,7 +255,7 @@ static int ieee80211_open(struct net_device *dev) switch (sdata->vif.type) { case IEEE80211_IF_TYPE_WDS: - if (is_zero_ether_addr(sdata->u.wds.remote_addr)) + if (!is_valid_ether_addr(sdata->u.wds.remote_addr)) return -ENOLINK; /* Create STA entry for the WDS peer */