if_tap unaligned access problem

Mike Silbersack silby at silby.com
Mon May 2 17:57:01 PDT 2005


On Tue, 3 May 2005, Sten Spans wrote:

> For the if_tap case fixing the driver ( or rather changing m_uiotombuf )
> is definately the correct solution. No sensible person would say otherwise.
> Once the if_tap change is properly tested and signed off it should
> make it into the tree.

Yes, that makes sense.

> But on the proposed alignment changes:
>
> If you would look at the netbsd url (
> http://mail-index.netbsd.org/source-changes/2002/07/01/0001.html )

As I said above, just leave the IP stack alone and put the (conditional on 
non-i386) code around line 731 of if_ethersubr.c:

         /* If the CRC is still on the packet, trim it off. */
         if (m->m_flags & M_HASFCS) {
                 m_adj(m, -ETHER_CRC_LEN);
                 m->m_flags &= ~M_HASFCS;
         }
<-- here
         switch (ether_type) {
#ifdef INET
         case ETHERTYPE_IP:

Then you cover all the protocols at once.

Mike "Silby" Silbersack


More information about the freebsd-net mailing list