From 32a284db3ae982aa9695d1378f5599d922bee615 Mon Sep 17 00:00:00 2001 From: thorpej Date: Thu, 8 Mar 2001 16:33:43 +0000 Subject: [PATCH] Make sure data after the header is aligned, so that this works on systems with strict alignment constraints. kern/12356, Feico Dillema . --- sys/dev/ic/an.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c index 70d6cf49d39b..d6729e6f9f7f 100644 --- a/sys/dev/ic/an.c +++ b/sys/dev/ic/an.c @@ -1,4 +1,4 @@ -/* $NetBSD: an.c,v 1.10 2000/12/21 15:37:18 onoe Exp $ */ +/* $NetBSD: an.c,v 1.11 2001/03/08 16:33:43 thorpej Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. @@ -403,6 +403,10 @@ static void an_rxeof(sc) m->m_pkthdr.rcvif = ifp; + /* Align the data after the ethernet header */ + m->m_data = (caddr_t) ALIGN(m->m_data + sizeof(struct ether_header)) - + sizeof(struct ether_header); + eh = mtod(m, struct ether_header *); #ifdef ANCACHE