Since we're now prepending the ethernet header to mbuf on incoming

packets, make sure to align the data after the ethernet header.
This commit is contained in:
pk 1999-05-21 13:08:50 +00:00
parent ac197c5354
commit 6f9ad5b61d
1 changed files with 9 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82586.c,v 1.21 1999/05/18 23:52:55 thorpej Exp $ */
/* $NetBSD: i82586.c,v 1.22 1999/05/21 13:08:50 pk Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -1125,6 +1125,14 @@ ieget(sc, to_bpf, head, totlen)
len = MCLBYTES;
}
if (m == m0) {
caddr_t newdata = (caddr_t)
ALIGN(m->m_data + sizeof(struct ether_header)) -
sizeof(struct ether_header);
len -= newdata - m->m_data;
m->m_data = newdata;
}
m->m_len = len = min(totlen, len);
totlen -= len;