-/* $OpenBSD: ieee80211_crypto_ccmp.c,v 1.2 2008/07/26 12:41:34 damien Exp $ */
+/* $OpenBSD: ieee80211_crypto_ccmp.c,v 1.3 2008/08/12 16:14:45 henning Exp $ */
/*-
* Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
goto nospace;
n = n->m_next;
n->m_len = MLEN;
- if (left > MLEN - IEEE80211_CCMP_MICLEN) {
+ if (left >= MINCLSIZE - IEEE80211_CCMP_MICLEN) {
MCLGET(n, M_DONTWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
goto nospace;
n = n->m_next;
n->m_len = MLEN;
- if (left > MLEN) {
+ if (left >= MINCLSIZE) {
MCLGET(n, M_DONTWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
-/* $OpenBSD: ieee80211_crypto_tkip.c,v 1.4 2008/07/26 12:36:15 damien Exp $ */
+/* $OpenBSD: ieee80211_crypto_tkip.c,v 1.5 2008/08/12 16:14:45 henning Exp $ */
/*-
* Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
goto nospace;
n = n->m_next;
n->m_len = MLEN;
- if (left > MLEN - IEEE80211_TKIP_TAILLEN) {
+ if (left >= MINCLSIZE - IEEE80211_TKIP_TAILLEN) {
MCLGET(n, M_DONTWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
goto nospace;
n = n->m_next;
n->m_len = MLEN;
- if (left > MLEN) {
+ if (left >= MINCLSIZE) {
MCLGET(n, M_DONTWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
-/* $OpenBSD: ieee80211_crypto_wep.c,v 1.3 2008/07/26 12:42:57 damien Exp $ */
+/* $OpenBSD: ieee80211_crypto_wep.c,v 1.4 2008/08/12 16:14:45 henning Exp $ */
/*-
* Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
goto nospace;
n = n->m_next;
n->m_len = MLEN;
- if (left > MLEN - IEEE80211_WEP_CRCLEN) {
+ if (left >= MINCLSIZE - IEEE80211_WEP_CRCLEN) {
MCLGET(n, M_DONTWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
goto nospace;
n = n->m_next;
n->m_len = MLEN;
- if (left > MLEN) {
+ if (left >= MINCLSIZE) {
MCLGET(n, M_DONTWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;