Subject: m_aux_*
To: Guenther Grau <>
From: None <>
List: tech-net
Date: 03/02/2000 22:34:55
>>take caution if you use it for keeping some data item for long period
>>of time - use extra caution on M_PREPEND() or m_adj(), as they may result
>>in loss of m->m_pkthdr.aux pointer (and mbuf leak).
>What does this mean: take caution if you use it for a long
>period? What is a long period? What happens if I someone
>doesn't follow this advice?
>And in which case does use of m_adj/M_PREPEND 
>result in loss of said pointer?

	sorry it wasn't clear enough, it just mean that I did not make
	extensive test to pass mbuf chain (with aux pointer filled in)
	through multiple protocol handlers.

	For example, suppose you wrote a code to:
	- attach mbuf to aux pointer in ip_input
	- let the mbuf go through IPsec header processing, and
		(this is "long period")
	- grab the aux pointer in tcp_input
	IPsec protocol handler may contribute to lossage of aux pointer.
	I think I took cautoin on m_copy and several other occasions so that
	there will be no lossage of aux pointer.  howeer, I did not made
	extensive tests myself, there can be loss of the pointer, and
	may result in mbuf memory leak.

	currently, ipsec is using m->m_pkthdr.aux.  however, it does not
	travel that long path.  I made tests for ipsec code and there was
	no memory leak.