Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 Jul 2004 09:38:58 +0200
From:      Andre Oppermann <andre@freebsd.org>
To:        Mike Silbersack <silby@silby.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: RANDOM_IP_ID sysctl?
Message-ID:  <40E66292.95598473@freebsd.org>
References:  <200406291413.ab33924@salmon.maths.tcd.ie> <20040702190516.Q65076@odysseus.silby.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mike Silbersack wrote:
> 
> On Tue, 29 Jun 2004, David Malone wrote:
> 
> > It seems to me that RANDOM_IP_ID might be better as a sysctl rather
> > than a kernel option. Would anyone mind if I changed this?
> >
> >       David.
> 
> I'd rather see a sysctl that switched between incremental frag IDs and
> arc4random() based IDs, followed by the removal of RANDOM_IP_ID.
> 
> For more info, see:
> 
> http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/netinet/ip_id.c
> 
> (I think we're still using the old code that's collision prone.)
> 
> Given that we're in a 16-bit space anyway, it's simpler to just use
> arc4random and stop pretending that we can avoid collisions.
> 
> Remember:  An IP ID collision is equivalent to a packet being lost; this
> is not a big deal.

An ip_id collision is only a problem (packet loss) if it is being
fragmented along the way and the delivery of the fragments happens
out-of-order, so that a fragment from a different packet gets re-
assembled with part of an earlier one.  Having many concurrent
connections to the same remote end-point with fragmentation in between
is of course making the chances bigger to hit this.

-- 
Andre



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40E66292.95598473>