fix ip_input m_len assertion

Nicolas Thery nthery at gmail.com
Mon Oct 27 10:36:56 PDT 2008


2008/10/27 Sepherosa Ziehau <sepherosa at gmail.com>:
> Hi all,
>
> Following patch fixes:
> - The assertion in ip_input, should test sizeof(struct ip) instead of sizeof(ip)
> - Make sure that ip_input's precondition meets in ip_localforward
> - Don't allow raw ip socket to send ip packet whose header length is
> less than the minimum
>
> http://leaf.dragonflybsd.org/~sephe/ip_assert.diff
>
> Please test/review.

The diff looks fine to me  (but I don't know much about networking).

Out of curiosity in ip_localforward(), how can the packet be freed
while we are trying to forward it?

+				/* The packet was freed; we are done */

Cheers,
Nicolas





More information about the Submit mailing list