From: Johannes Berg <[EMAIL PROTECTED]>
Date: Tue Jan 10 19:12:19 2006 +0100
Subject: [PATCH] softmac: check if disassociation is for us before processing it

Signed-off-by: John W. Linville <[EMAIL PROTECTED]>

---

 net/ieee80211/softmac/ieee80211softmac_assoc.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

9ae84cc2f28c2d6979d7c8435d5753f5bc22c76d
diff --git a/net/ieee80211/softmac/ieee80211softmac_assoc.c 
b/net/ieee80211/softmac/ieee80211softmac_assoc.c
index 9fd4090..dd5d5cf 100644
--- a/net/ieee80211/softmac/ieee80211softmac_assoc.c
+++ b/net/ieee80211/softmac/ieee80211softmac_assoc.c
@@ -349,7 +349,10 @@ ieee80211softmac_handle_disassoc(struct 
 {
        struct ieee80211softmac_device *mac = ieee80211_priv(dev);
        unsigned long flags;
-       /* FIXME: check that this frame is from the right AP!! */
+       if (memcmp(disassoc->header.addr2, mac->associnfo.bssid, ETH_ALEN))
+               return 0;
+       if (memcmp(disassoc->header.addr1, mac->dev->dev_addr, ETH_ALEN))
+               return 0;
        dprintk(KERN_INFO PFX "got disassoc frame\n");
        netif_carrier_off(dev);
        spin_lock_irqsave(&mac->lock, flags);
-- 
1.2.4

-- 
John W. Linville
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to