In in_delayed_cksum() we can't perform a m_pullup() as it may

change the mbuf pointer and we don't have any way of passing
it back to the callers.  Instead just fail silently without
updating the checksum but leaving the mbuf+chain intact.

A search in our GNATS database did not turn up any match for
the existing warning message when this case is encountered.

Found by:	Coverity Prevent(tm)
Coverity ID:	CID779
Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 days
This commit is contained in:
Andre Oppermann 2006-01-18 18:49:16 +00:00
parent 59e301b7eb
commit 8f8d29f686

View File

@ -1043,9 +1043,9 @@ in_delayed_cksum(struct mbuf *m)
* XXX
* this shouldn't happen, but if it does, the
* correct behavior may be to insert the checksum
* in the existing chain instead of rearranging it.
* in the appropriate next mbuf in the chain.
*/
m = m_pullup(m, offset + sizeof(u_short));
return;
}
*(u_short *)(m->m_data + offset) = csum;
}