Return-path: Received: from py-out-1112.google.com ([64.233.166.176]:22213 "EHLO py-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756786AbXKZRf1 (ORCPT ); Mon, 26 Nov 2007 12:35:27 -0500 Received: by py-out-1112.google.com with SMTP id u77so1493823pyb for ; Mon, 26 Nov 2007 09:35:25 -0800 (PST) Message-ID: (sfid-20071126_173530_686302_83A4301A) Date: Mon, 26 Nov 2007 18:35:24 +0100 From: dragoran To: "Johannes Berg" Subject: [PATCH] rate limit wep decrypt failed messages Cc: linux-wireless , "Dan Williams" , "Jouni Malinen" , ipw3945-devel , "Zhu Yi" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Nov 26, 2007 6:01 PM, Johannes Berg wrote: > > > looking at the code seems not: > > --- > > if (ieee80211_wep_decrypt_data(local->wep_rx_tfm, rc4key, klen, > > skb->data + hdrlen + WEP_IV_LEN, > > len)) { > > printk(KERN_DEBUG "WEP decrypt failed (ICV)\n"); > > ret = -1; > > } > > --- > > Huh I thought they were. Of course they need to be rate limited then. > Can you send a patch? > sure attached. ---- Signed-off-by: Adel Gadllah diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c index 9bf0e1c..b5f3413 100644 --- a/net/mac80211/wep.c +++ b/net/mac80211/wep.c @@ -265,7 +265,8 @@ int ieee80211_wep_decrypt(struct ieee80211_local *local, struct sk_buff *skb, if (ieee80211_wep_decrypt_data(local->wep_rx_tfm, rc4key, klen, skb->data + hdrlen + WEP_IV_LEN, len)) { - printk(KERN_DEBUG "WEP decrypt failed (ICV)\n"); + if (net_ratelimit()) + printk(KERN_DEBUG "WEP decrypt failed (ICV)\n"); ret = -1; }