Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Dec 2006 11:50:19 -0500 (EST)
From:      "Mike Silbersack" <silby@silby.com>
To:        "Colin Percival" <cperciva@freebsd.org>
Cc:        Adam McDougall <mcdouga9@egr.msu.edu>, freebsd-current@freebsd.org, Mike Silbersack <silby@silby.com>
Subject:   Re: Fwd: Re: pf: BAD state happens often with portsnap fetch update
Message-ID:  <2472.68.253.24.139.1167151819.squirrel@webmail11.pair.com>
In-Reply-To: <45908ED3.4040503@freebsd.org>
References:  <20061210010823.GS81923@egr.msu.edu> <457B621E.3020100@freebsd.org> <20061210014924.GU81923@egr.msu.edu> <457B7084.9070409@freebsd.org> <20061214172323.GP1011@egr.msu.edu> <45908ED3.4040503@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> The random port allocation, because it is completely random, runs into the
> birthday problem if it tries to allocate too many ports: Within a few
> hundred
> port allocations, there's almost certainly going to be a collision.  To
> get
> around this problem, the port allocator watches how many ports are being
> allocated, and switches to sequential allocations if it thinks that the
> rate
> of port allocation is likely to result in collisions occurring.
>
> Unfortunately, this switch isn't occurring quickly enough to avoid
> problems;
> I'm not sure if this can be easily fixed (except via the workaround of
> turning
> off randomized port allocations), but maybe Mike Silbersack (CCed) will
> have
> some ideas.
>
> Colin Percival

Colin's description is accurate, but I haven't read up to this point in
the thread, and I need more information.

To prove whether or not this is really port randomization's fault for
using ports excessively quickly (say, within 1ms) or whether something is
going wrong due to ports being used relatively quickly (say, within 1
seconds), please do the following:

1.  Disable randomization
2.  Set the ephemeral port range to something small like 49152 to 49352.
3.  Re-run the test in question.

Tell me how it goes.

Mike "Silby" Silbersack



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