netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cann <shum@canndrew.org>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: UDP packets arriving on wrong sockets
Date: Fri, 3 Aug 2018 00:19:11 -0400	[thread overview]
Message-ID: <20180803041911.GA30724@canndrew.org> (raw)
In-Reply-To: <CAF=yD-KJn8ODsE1cKfRwJ5nFLwnDw-K4s1UhijnxkqX7GtO0OQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

On Thu, Aug 02, 2018 at 11:21:41AM -0400, Willem de Bruijn wrote:
> You have two sockets bound to the same address and port? Is this using
> SO_REUSEPORT?

Yes, this is using SO_REUSEPORT.

My colleague wrote a python reproducer for this here:
https://gist.github.com/povilasb/53f1c802dbc2aca36a0ffa5b4cb95536

If you run server.py, then client.py, you should see packets arriving at
opposite sockets about half the time. My kernel version is NixOS 4.14.51, he
tested on two different machines - a debian 4.9.0 and fedora 28 4.17.2. We can
reproduce this on all kernels we tested.

Thanks in advance for any help you can give :)

 - Andrew


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2018-08-03  6:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-02  9:05 UDP packets arriving on wrong sockets Andrew Cann
2018-08-02 13:20 ` Eric Dumazet
2018-08-02 13:35   ` Eric Dumazet
2018-08-02 15:21   ` Willem de Bruijn
2018-08-02 15:28     ` Eric Dumazet
2018-08-03  4:19     ` Andrew Cann [this message]
2018-08-03 14:20       ` Willem de Bruijn
2018-08-03 15:20         ` Andrew Cann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180803041911.GA30724@canndrew.org \
    --to=shum@canndrew.org \
    --cc=netdev@vger.kernel.org \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).