From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH net-next] net: llc: remove init_net check Date: Thu, 30 Nov 2017 12:12:46 -0800 Message-ID: <1512072766.19682.27.camel@gmail.com> References: <20171130194526.8076-1-aring@mojatatu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Cc: hadi@mojatatu.com, netdev@vger.kernel.org To: Alexander Aring , davem@davemloft.net Return-path: Received: from mail-pf0-f179.google.com ([209.85.192.179]:46387 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750773AbdK3UMs (ORCPT ); Thu, 30 Nov 2017 15:12:48 -0500 Received: by mail-pf0-f179.google.com with SMTP id c204so3580853pfc.13 for ; Thu, 30 Nov 2017 12:12:48 -0800 (PST) In-Reply-To: <20171130194526.8076-1-aring@mojatatu.com> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 2017-11-30 at 14:45 -0500, Alexander Aring wrote: > Commit e730c15519d09 ("[NET]: Make packet reception network namespace > safe") added several init_net compares to protocols with unknown > net namespace support. The idea was as users started using the > different > protocols they would test and enable them. > In our use-case we generate STP enabled Linux bridges in different > namespaces. The bridges are connected via veth interfaces. > This patch makes STP work in such a setup. > > Signed-off-by: Alexander Aring > --- >  net/llc/llc_input.c | 4 ---- >  1 file changed, 4 deletions(-) > > diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c > index 82cb93f66b9b..09b530d90610 100644 > --- a/net/llc/llc_input.c > +++ b/net/llc/llc_input.c > @@ -14,7 +14,6 @@ >  #include >  #include >  #include > -#include >  #include >  #include >  #include > @@ -162,9 +161,6 @@ int llc_rcv(struct sk_buff *skb, struct > net_device *dev, >   void (*sta_handler)(struct sk_buff *skb); >   void (*sap_handler)(struct llc_sap *sap, struct sk_buff > *skb); >   > - if (!net_eq(dev_net(dev), &init_net)) > - goto drop; > - >   /* >    * When the interface is in promisc. mode, drop all the crap > that it >    * receives, do not try to analyse it. Well, we use different netns for isolation. You need more changes than simply removing this check, I guess. __llc_sap_find() would need a per netns list, or proper netns checks.