netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: wenxu <wenxu@ucloud.cn>
To: netfilter-devel@vger.kernel.org, pablo@netfilter.org
Subject: Re: [PATCH nf] netfilter: nf_tables_offload: Fix check the NETDEV_UNREGISTER in netdev event
Date: Mon, 2 Dec 2019 11:16:49 +0800	[thread overview]
Message-ID: <a7a98d09-f030-7fe7-b97d-23c9ee1415d5@ucloud.cn> (raw)
In-Reply-To: <1573618867-9755-1-git-send-email-wenxu@ucloud.cn>

Hi pablo,


Any comments about this patch?


BR

wenxu

On 11/13/2019 12:21 PM, wenxu@ucloud.cn wrote:
> From: wenxu <wenxu@ucloud.cn>
>
> It should check the NETDEV_UNREGISTER in  nft_offload_netdev_event
>
> Fixes: 06d392cbe3db ("netfilter: nf_tables_offload: remove rules when the device unregisters")
> Signed-off-by: wenxu <wenxu@ucloud.cn>
> ---
>  net/netfilter/nf_tables_offload.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/net/netfilter/nf_tables_offload.c b/net/netfilter/nf_tables_offload.c
> index e25dab8..b002832 100644
> --- a/net/netfilter/nf_tables_offload.c
> +++ b/net/netfilter/nf_tables_offload.c
> @@ -446,6 +446,9 @@ static int nft_offload_netdev_event(struct notifier_block *this,
>  	struct net *net = dev_net(dev);
>  	struct nft_chain *chain;
>  
> +	if (event != NETDEV_UNREGISTER)
> +		return 0;
> +
>  	mutex_lock(&net->nft.commit_mutex);
>  	chain = __nft_offload_get_chain(dev);
>  	if (chain)

  reply	other threads:[~2019-12-02  3:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13  4:21 [PATCH nf] netfilter: nf_tables_offload: Fix check the NETDEV_UNREGISTER in netdev event wenxu
2019-12-02  3:16 ` wenxu [this message]
2019-12-02  9:21 ` Pablo Neira Ayuso
2019-12-02  9:23 ` Pablo Neira Ayuso
2019-12-02  9:25   ` Pablo Neira Ayuso

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=a7a98d09-f030-7fe7-b97d-23c9ee1415d5@ucloud.cn \
    --to=wenxu@ucloud.cn \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).