Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci In the `copy small' path, make sure to align the...
details: https://anonhg.NetBSD.org/src/rev/9eb0ae9d8be5
branches: trunk
changeset: 511904:9eb0ae9d8be5
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Jun 29 23:36:03 2001 +0000
description:
In the `copy small' path, make sure to align the payload.
diffstat:
sys/dev/pci/if_ste.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r a4f5361ec6e9 -r 9eb0ae9d8be5 sys/dev/pci/if_ste.c
--- a/sys/dev/pci/if_ste.c Fri Jun 29 23:33:02 2001 +0000
+++ b/sys/dev/pci/if_ste.c Fri Jun 29 23:36:03 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ste.c,v 1.1 2001/06/19 23:00:47 thorpej Exp $ */
+/* $NetBSD: if_ste.c,v 1.2 2001/06/29 23:36:03 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -1024,10 +1024,11 @@
* chain. If this fails, we drop the packet and
* recycle the old buffer.
*/
- if (ste_copy_small != 0 && len <= MHLEN) {
+ if (ste_copy_small != 0 && len <= (MHLEN - 2)) {
MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL)
goto dropit;
+ m->m_data += 2;
memcpy(mtod(m, caddr_t),
mtod(ds->ds_mbuf, caddr_t), len);
STE_INIT_RXDESC(sc, i);
Home |
Main Index |
Thread Index |
Old Index