From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: UDP packets arriving on wrong sockets Date: Thu, 2 Aug 2018 08:28:13 -0700 Message-ID: <9ffedf25-bbd7-d020-2413-f78fdc439f2e@gmail.com> References: <20180802090505.GA29624@canndrew.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: shum@canndrew.org, Network Development To: Willem de Bruijn , Eric Dumazet Return-path: Received: from mail-pg1-f170.google.com ([209.85.215.170]:47054 "EHLO mail-pg1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732478AbeHBRTz (ORCPT ); Thu, 2 Aug 2018 13:19:55 -0400 Received: by mail-pg1-f170.google.com with SMTP id f14-v6so843804pgv.13 for ; Thu, 02 Aug 2018 08:28:15 -0700 (PDT) In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 08/02/2018 08:21 AM, Willem de Bruijn wrote: > On Thu, Aug 2, 2018 at 9:21 AM Eric Dumazet wrote: >> >> >> >> On 08/02/2018 02:05 AM, Andrew Cann wrote: >>> Hi, >>> >>> I posted this on stackoverflow yesterday but I'm reposting it here since it got >>> no response. Original post: https://stackoverflow.com/questions/51630337/udp-packets-arriving-on-wrong-sockets-on-linux >>> >>> I have two UDP sockets bound to the same address and connected to addresses A >>> and B. I have two more UDP sockets bound to A and B and not connected. >>> >>> This is what my /proc/net/udp looks like (trimmed for readability): >>> >>> sl local_address rem_address >>> 3937: 0100007F:DD9C 0300007F:9910 >>> 3937: 0100007F:DD9C 0200007F:907D > > You have two sockets bound to the same address and port? Is this using > SO_REUSEPORT? Yeah, time to add listen() and accept() support for UDP :)