From: damien Date: Tue, 12 Aug 2008 19:45:22 +0000 (+0000) Subject: do not drop frames that have an invalid IE, just stop processing X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b298534229367f2ffe2c38451936116a720d2b3c;p=openbsd do not drop frames that have an invalid IE, just stop processing more IEs. --- diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index f4a14fd9808..e57853d8e72 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_input.c,v 1.93 2008/08/12 19:42:37 damien Exp $ */ +/* $OpenBSD: ieee80211_input.c,v 1.94 2008/08/12 19:45:22 damien Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe @@ -969,7 +969,7 @@ ieee80211_recv_probe_resp(struct ieee80211com *ic, struct mbuf *m0, while (frm + 2 <= efrm) { if (frm + 2 + frm[1] > efrm) { ic->ic_stats.is_rx_elem_toosmall++; - return; + break; } switch (frm[0]) { case IEEE80211_ELEMID_SSID: @@ -1259,7 +1259,7 @@ ieee80211_recv_probe_req(struct ieee80211com *ic, struct mbuf *m0, while (frm + 2 <= efrm) { if (frm + 2 + frm[1] > efrm) { ic->ic_stats.is_rx_elem_toosmall++; - return; + break; } switch (frm[0]) { case IEEE80211_ELEMID_SSID: @@ -1413,7 +1413,7 @@ ieee80211_recv_assoc_req(struct ieee80211com *ic, struct mbuf *m0, while (frm + 2 <= efrm) { if (frm + 2 + frm[1] > efrm) { ic->ic_stats.is_rx_elem_toosmall++; - return; + break; } switch (frm[0]) { case IEEE80211_ELEMID_SSID: @@ -1656,7 +1656,7 @@ ieee80211_recv_assoc_resp(struct ieee80211com *ic, struct mbuf *m0, while (frm + 2 <= efrm) { if (frm + 2 + frm[1] > efrm) { ic->ic_stats.is_rx_elem_toosmall++; - return; + break; } switch (frm[0]) { case IEEE80211_ELEMID_RATES: