Re: mbuf_outbound_finalize() reports packet length is less than mbuf length
Re: mbuf_outbound_finalize() reports packet length is less than mbuf length
- Subject: Re: mbuf_outbound_finalize() reports packet length is less than mbuf length
- From: mm w <email@hidden>
- Date: Sat, 25 Jul 2009 14:09:44 +0200
Hello,
network byte-order? can you give a snap code? do you copy mbuf?
> ip_len is 14 bytes less than the mbuf length
network byte-order? // those functions are handling swaping jobs
ret = mbuf_copydata(
*thedata,
theoffset,
sizeof (theiplen), &theiplen)
...
if (ret == 0) and theiplen ...
...
see next
> is whether I should do some packet verification before calling
yes, always working with safe data is a minimum at all, whatever the area
mbuf_outbound_finalize(
*thedata,
theprotocol,
...
ecetera
Best,
On Sat, Jul 25, 2009 at 12:38 AM, Brendan Creane<email@hidden> wrote:
> Greetings. My interface filter nke is seeing outbound AF_INET packets with
> an ip_len that doesn't account for the protocol header. For example, for an
> interface that expects the 14 byte eth header at the beginning of the
> outbound packet, ip_len is 14 bytes less than the mbuf length. When I call
> mbuf_outbound_finalize(), in_delayed_cksum_offset bails on processing the
> packet and reports "in_delayed_cksum_offset: ip_len (XX) doesn't match
> actual length YY." This seems to only happen for udp packets, not tcp
> packets.
> I'd prefer to not clutter up the system log with this message. My question
> is whether I should do some packet verification before calling
> mbuf_outbound_finalize, or if this is a problem either with the entity
> creating the packet, or with in_delayed_cksum_offset().
> thanks for your time, regards
> Brendan Creane
> _______________________________________________
> 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
>
_______________________________________________
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