You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Allen Firstenberg <pr...@addventure.com> on 2011/06/16 21:01:05 UTC

Re: [proftpd] Re: Re: Re: Possible problem pertaining passive ports

I have opened this at
https://issues.apache.org/jira/browse/FTPSERVER-420and attached two
diff files reflecting the required changes to implement
"random port".  I've also included the full PassivePorts.java file, in case
that was easier to work with.

Allen

On Thu, Jun 16, 2011 at 5:49 AM, Niklas Gustavsson <ni...@protocol7.com>wrote:

> On Wed, Jun 15, 2011 at 11:01 PM, Allen Firstenberg
> <pr...@addventure.com> wrote:
> >> Please do. Though, keeping a list of free ports might not be optimal
> >> if the list is long (i.e. a big span of allowed ports).
> >
> > It depends what you mean by "optimal".  In some rough tests I did, time
> to
> > create a PassivePorts object is roughly the same between the two schemes,
> > although time to allocate all 65535 possible ports is 2-3 times slower
> under
> > the old scheme.  Memory is the opposite - my proposed scheme uses 3-4
> times
> > the amount of memory the old scheme uses, mostly because of the need to
> > allocate the Integer objects.  An implementation that used ints instead
> of
> > Integers could probably get the memory size to be roughly the same.
>
> Let's not worry about this prematurely. When you're done, let's have a
> look at the code instead.
>
> /niklas
>