D49677 introduced the new function in_delayed_cksum_o in ip_output.c that computes the checksum even if the mbuf does not start with the IP header by using the parameter iph_offset as the offset to the IP header.
If the iph_offset is larger than 0, this function computes a wrong checksum for a TCP packet. For a TCP packet, it calls in_cksum_skip with the IP total length field value as second parameter, where in_cksum_skip expects the length of the mbuf.