netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexander Aring <aring@mojatatu.com>, davem@davemloft.net
Cc: hadi@mojatatu.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: llc: remove init_net check
Date: Thu, 30 Nov 2017 12:12:46 -0800	[thread overview]
Message-ID: <1512072766.19682.27.camel@gmail.com> (raw)
In-Reply-To: <20171130194526.8076-1-aring@mojatatu.com>

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 <aring@mojatatu.com>
> ---
>  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 <linux/netdevice.h>
>  #include <linux/slab.h>
>  #include <linux/export.h>
> -#include <net/net_namespace.h>
>  #include <net/llc.h>
>  #include <net/llc_pdu.h>
>  #include <net/llc_sap.h>
> @@ -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.

  reply	other threads:[~2017-11-30 20:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30 19:45 [PATCH net-next] net: llc: remove init_net check Alexander Aring
2017-11-30 20:12 ` Eric Dumazet [this message]
2017-12-13 19:09   ` Alexander Aring

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=1512072766.19682.27.camel@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=aring@mojatatu.com \
    --cc=davem@davemloft.net \
    --cc=hadi@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    /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).