Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Oct 2003 13:23:32 -0600 (CST)
From:      Mike Silbersack <silby@silby.com>
To:        Bruce M Simpson <bms@spc.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Changes to PCBPORTHASH wrt TCP, review needed
Message-ID:  <20031028131329.J19707@odysseus.silby.com>
In-Reply-To: <20031028050103.GA7279@saboteur.dek.spc.org>
References:  <20031027014854.K2023@odysseus.silby.com> <20031028050103.GA7279@saboteur.dek.spc.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, 28 Oct 2003, Bruce M Simpson wrote:

> We discussed on IRC that this problem of ephemeral port hash mapping may also
> affect udp PCBs, and that it may be having undesirable effects with multiple
> concurrent media streams, as RTP/RTCP is a heavy udp socket consumer in a
> large installation, and has specific requirements for binding consecutive
> odd/even port pairs (more details in RFC 3550 for those who care).
>
> I will test the patch shortly. I have looked over it and can't find any
> immediate problems with it, but further digestion on my part is required.
>
> BMS

Bleh, I found a problem with my suggested change.  Suppose that a program
works as follows:

1.  bind (to an ephemeral port)
2.  connect

It's very possible that bind will return a port which can't be used
because it's already in use for that destination lport-laddr-fport-faddr
tuple, so the connect will fail with EADDRINUSE.

So, it looks like I can't solve this so simply... looks like I'll have to
have the port lookup do IP comparisons as well.

Mike "Silby" Silbersack



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