Subject: Re: Patch to make upper-layer network protocols align as needed
To: None <thorpej@wasabisystems.com>
From: None <itojun@iijlab.net>
List: tech-net
Date: 05/13/2002 11:03:48
>I have written a patch that does this for IPv4 and IPv6.  The patch
>includes the follwing:
>	* New mbuf utility function, m_slurp().  This is like m_pullup()
>	  except that it always performs the operation, and allows an
>	  offset into the new buffer to be specified (this allows you to
>	  leave space for link headers, in case you end up forwarding the
>	  packet).

	looks good to me, but...

>So far, I've only had to place "make this aligned, please" in the ip_input()
>and ip6_input() routines.  In TCP/UDP, etc., subsequent pullup/pulldown
>operations end up being aligned as a side-effect of the IP header being
>aligned.

	the "side-effect" will happen only if m_pullup() is called, or
	m_pulldown() is called with off == 0 (2nd arg).  i guess we need
	some check in IP6_EXTHDR_GET() macro.

itojun