summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/net80211/ieee80211_crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/net80211/ieee80211_crypto.c')
-rw-r--r--freebsd/sys/net80211/ieee80211_crypto.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/freebsd/sys/net80211/ieee80211_crypto.c b/freebsd/sys/net80211/ieee80211_crypto.c
index 2e28538c..264e3f17 100644
--- a/freebsd/sys/net80211/ieee80211_crypto.c
+++ b/freebsd/sys/net80211/ieee80211_crypto.c
@@ -664,14 +664,15 @@ ieee80211_crypto_decap(struct ieee80211_node *ni, struct mbuf *m, int hdrlen,
k = &ni->ni_ucastkey;
/*
- * Insure crypto header is contiguous for all decap work.
+ * Insure crypto header is contiguous and long enough for all
+ * decap work.
*/
cip = k->wk_cipher;
- if (m->m_len < hdrlen + cip->ic_header &&
- (m = m_pullup(m, hdrlen + cip->ic_header)) == NULL) {
+ if (m->m_len < hdrlen + cip->ic_header) {
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr2,
- "unable to pullup %s header", cip->ic_name);
- vap->iv_stats.is_rx_wepfail++; /* XXX */
+ "frame is too short (%d < %u) for crypto decap",
+ cip->ic_name, m->m_len, hdrlen + cip->ic_header);
+ vap->iv_stats.is_rx_tooshort++;
*key = NULL;
return (0);
}