Calculate any delayed checksums before handing an mbuf off to a

divert socket.  This fixes a problem with ppp/natd.

Reviewed by:	bsd	(Brian Dean, gotta love that login name)
This commit is contained in:
Jonathan Lemon 2000-04-01 18:51:03 +00:00
parent 2f694bd90e
commit ea53ecd9d4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58895

View file

@ -506,6 +506,16 @@ ip_output(m0, opt, ro, flags, imo)
if ((off & IP_FW_PORT_TEE_FLAG) != 0)
clone = m_dup(m, M_DONTWAIT);
/*
* XXX
* delayed checksums are not currently compatible
* with divert sockets.
*/
if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
in_delayed_cksum(m);
m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
}
/* Restore packet header fields to original values */
HTONS(ip->ip_len);
HTONS(ip->ip_off);