cvs commit: src/sys/netinet ip_id.c

Mike Silbersack silby at silby.com
Wed Feb 6 07:44:42 PST 2008


On Wed, 6 Feb 2008, Mike Silbersack wrote:

> silby       2008-02-06 15:40:31 UTC
>
>  FreeBSD src repository
>
>  Modified files:
>    sys/netinet          ip_id.c
>  Log:
>  Replace the random IP ID generation code we
>  obtained from OpenBSD with an algorithm suggested
>  by Amit Klein.  The OpenBSD algorithm has a few
>  flaws; see Amit's paper for more information.
>
>  For a description of how this algorithm works,
>  please see the comments within the code.
>
>  Note that this commit does not yet enable random IP ID
>  generation by default.  There are still some concerns
>  that doing so will adversely affect performance.
>
>  Reviewed by:  rwatson
>  MFC After: 2 weeks
>
>  Revision  Changes    Path
>  1.10      +155 -147  src/sys/netinet/ip_id.c

FWIW,

There are a few minor tweaks to be made, such as mallocing
the data structures when you enable random_id
rather than when you send the first packet.  Those
changes will happen in a subsequent commit sometime
in the next few days.

Robert has some ideas on how to keep per-IP state
so that we can use sequential IP IDs in performance
and ID life criticial areas of the system.  If those ideas
work, we can then enable this algorithm for all the
non-performance critical areas of the network stack,
such as RSTs, icmp, etc.

Mike "Silby" Silbersack


More information about the cvs-src mailing list