Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Sep 2016 05:47:22 -0700
From:      Maxim Sobolev <sobomax@freebsd.org>
To:        FreeBSD Net <freebsd-net@freebsd.org>, Gleb Smirnoff <glebius@freebsd.org>
Subject:   Re: Which UDP sockets the incoming packet is delivered to when both wildcard and non-wildcard listeners are present
Message-ID:  <CAH7qZfsUOnpQKj0V4sv7ws%2BbSmgK3V-1bSA1UUVp49UFTxWQuw@mail.gmail.com>
In-Reply-To: <CAH7qZfvZ63rcNhrwzMzbTkB8S-F%2Bk1FF=0vXvgwd%2BqGPSyA%2BcQ@mail.gmail.com>
References:  <CAH7qZfvZ63rcNhrwzMzbTkB8S-F%2Bk1FF=0vXvgwd%2BqGPSyA%2BcQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
P.S. Destination UDP address of the message in question is obviously
 X.Y.Z.W:5071.

On Mon, Sep 5, 2016 at 5:42 AM, Maxim Sobolev <sobomax@freebsd.org> wrote:

> Hi Netters,
>
> Suppose we have two threads in the system both bound to a same specific
> UDP port, one using INADDR_ANY and another one using actual IP. When
> incoming message arrives to that port is there any guarantee as to which of
> those two threads going to see the message? The question has arisen from
> the observation that most of the time the thread that is bound to a
> specific IP gets them, but occasionally we see INADDR_ANY-bound thread
> receiving few packets as well. So that behavior seems to be "almost
> deterministic" and we are wondering where that "almost" part is expected or
> some kind of socket matching bug?
>
> OS in question is 10.3-RELEASE-p5
>
> [ssp-root@dal23 ~]$ sockstat | grep 24421 | grep udp4 | grep -w 5071
> b2bua    python2.7  24421 7  udp4   *:5071                *:*
> b2bua    python2.7  24421 58 udp4   X.Y.Z.W:5071     *:*
>
> I apologize if this is answered somewhere already, any pointers would be
> appreciated. Thanks!
>
> -Max
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAH7qZfsUOnpQKj0V4sv7ws%2BbSmgK3V-1bSA1UUVp49UFTxWQuw>