From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next v4 1/9] net: allow binding socket in a VRF when there's an unbound socket Date: Tue, 6 Nov 2018 10:52:36 -0700 Message-ID: References: <20181102191020.14170-1-mmanning@vyatta.att-mail.com> <20181102191020.14170-2-mmanning@vyatta.att-mail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Robert Shearman To: Mike Manning , netdev@vger.kernel.org Return-path: Received: from mail-pf1-f196.google.com ([209.85.210.196]:37923 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730688AbeKGDTB (ORCPT ); Tue, 6 Nov 2018 22:19:01 -0500 Received: by mail-pf1-f196.google.com with SMTP id b11-v6so6454621pfi.5 for ; Tue, 06 Nov 2018 09:52:40 -0800 (PST) In-Reply-To: <20181102191020.14170-2-mmanning@vyatta.att-mail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/2/18 1:10 PM, Mike Manning wrote: > From: Robert Shearman > > Change the inet socket lookup to avoid packets arriving on a device > enslaved to an l3mdev from matching unbound sockets by removing the > wildcard for non sk_bound_dev_if and instead relying on check against > the secondary device index, which will be 0 when the input device is > not enslaved to an l3mdev and so match against an unbound socket and > not match when the input device is enslaved. > > Change the socket binding to take the l3mdev into account to allow an > unbound socket to not conflict sockets bound to an l3mdev given the > datapath isolation now guaranteed. > > Signed-off-by: Robert Shearman > Signed-off-by: Mike Manning > --- > Documentation/networking/vrf.txt | 9 +++++---- > include/net/inet6_hashtables.h | 5 ++--- > include/net/inet_hashtables.h | 13 ++++++------- > include/net/inet_sock.h | 13 +++++++++++++ > net/ipv4/inet_connection_sock.c | 13 ++++++++++--- > net/ipv4/inet_hashtables.c | 20 +++++++++++++++----- > 6 files changed, 51 insertions(+), 22 deletions(-) > Reviewed-by: David Ahern