When preserving the IP header in extra mbuf in the IP forwarding

case, also preserve the MAC label.  Note that this mbuf allocation
is fairly non-optimal, but not my fault.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
This commit is contained in:
Robert Watson 2002-08-02 20:45:27 +00:00
parent 01e990be89
commit e316463a86

View File

@ -1690,6 +1690,13 @@ ip_forward(struct mbuf *m, int srcrt, struct sockaddr_in *next_hop)
mcopy->m_len = imin((IP_VHL_HL(ip->ip_vhl) << 2) + 8,
(int)ip->ip_len);
m_copydata(m, 0, mcopy->m_len, mtod(mcopy, caddr_t));
#ifdef MAC
/*
* XXXMAC: This will eventually become an explicit
* labeling point.
*/
mac_create_mbuf_from_mbuf(m, mcopy);
#endif
}
#ifdef IPSTEALTH