diff options
author | dfr <dfr@FreeBSD.org> | 1998-07-12 16:46:52 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-07-12 16:46:52 +0000 |
commit | dfb8bf9c472183d4f414f43c09005cba16369ff3 (patch) | |
tree | fc569cdda49c5183ba1f908ba9a49cdda9ff84ad | |
parent | bdb4d90548b25551c32744913d7f68eba1af8717 (diff) | |
download | FreeBSD-src-dfb8bf9c472183d4f414f43c09005cba16369ff3.zip FreeBSD-src-dfb8bf9c472183d4f414f43c09005cba16369ff3.tar.gz |
Make sure the packet is aligned correctly for the alpha in if_simloop.
-rw-r--r-- | sys/net/if_loop.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index be6d25c..eef3615 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_loop.c 8.1 (Berkeley) 6/10/93 - * $Id: if_loop.c,v 1.35 1998/06/14 20:58:15 julian Exp $ + * $Id: if_loop.c,v 1.36 1998/06/14 23:53:43 julian Exp $ */ /* @@ -216,8 +216,19 @@ if_simloop(ifp, m, dst, hlen) #endif /* Strip away media header */ - if (hlen > 0) + if (hlen > 0) { +#ifdef __alpha__ + /* The alpha doesn't like unaligned data. + * We move data down in the first mbuf */ + if (hlen & 3) { + bcopy(m->m_data + hlen, m->m_data, m->m_len - hlen); + m->m_len -= hlen; + if (m->m_flags & M_PKTHDR) + m->m_pkthdr.len -= hlen; + } else +#endif m_adj(m, hlen); + } switch (dst->sa_family) { #ifdef INET |