summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ral.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/ral.c')
-rw-r--r--sys/dev/ic/ral.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/ic/ral.c b/sys/dev/ic/ral.c
index 904a1603d11..8f14d79214a 100644
--- a/sys/dev/ic/ral.c
+++ b/sys/dev/ic/ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ral.c,v 1.64 2005/11/23 20:51:20 damien Exp $ */
+/* $OpenBSD: ral.c,v 1.65 2005/11/23 21:29:01 damien Exp $ */
/*-
* Copyright (c) 2005
@@ -1918,11 +1918,13 @@ ral_tx_data(struct ral_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
}
M_DUP_PKTHDR(mnew, m0);
- MCLGET(mnew, M_DONTWAIT);
- if (!(mnew->m_flags & M_EXT)) {
- m_freem(m0);
- m_freem(mnew);
- return ENOMEM;
+ if (m0->m_pkthdr.len > MHLEN) {
+ MCLGET(mnew, M_DONTWAIT);
+ if (!(mnew->m_flags & M_EXT)) {
+ m_freem(m0);
+ m_freem(mnew);
+ return ENOMEM;
+ }
}
m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, caddr_t));