mbuf_outbound_finalize and in_delayed_cksum_offset
mbuf_outbound_finalize and in_delayed_cksum_offset
- Subject: mbuf_outbound_finalize and in_delayed_cksum_offset
- From: Anton Kuzmin <email@hidden>
- Date: Mon, 26 Sep 2005 15:03:24 +0100
Hello,
Our interface filter needs to call mbuf_outbound_finalize on outgoing
packets before performing some additional filtering, and while debugging
a kernel panic related to this I noticed a strange comment in
in_delayed_cksum_offset (called by mbuf_outbound_finalize):
...
if (ip_offset + sizeof(struct ip) > m->m_len) {
printf("delayed m_pullup, m->len: %d off: %d p: %d\n",
m->m_len, ip_offset, ip->ip_p);
/*
* XXX
* this shouldn't happen
*/
m = m_pullup(m, ip_offset + sizeof(struct ip));
}
...
and the following truly never happens, as "ip" used in printf(ip->ip_p)
is not initialized at that point and the kernel panics, although I don't
think that was the original meaning of the comment.
But putting this aside (I'll do a bug report on this), what is the
reason not to expect a packet split in a chain of mbufs (and too short
first mbuf as a result) as I'm definitely seeing them in the output
function of the interface filter (i.e. some multicast mdns packets,
first mbuf is 14 bytes long and contains just the ethernet header)?
Or is it just a case of not taking into account that
in_delayed_cksum_offset can now be called from the outbound interface
filter path?
Anton
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden