[PATCH] softmac: check if disassociation is for us before processing it
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 10 Jan 2006 18:12:19 +0000 (19:12 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 23 Mar 2006 03:16:54 +0000 (22:16 -0500)
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/ieee80211/softmac/ieee80211softmac_assoc.c

index 9fd409099b538c83d16ccd7681d49fc148b7e82e..dd5d5cf7189a2a4b39b3657848329739fc720053 100644 (file)
@@ -349,7 +349,10 @@ ieee80211softmac_handle_disassoc(struct net_device * dev,
 {
        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);