From: Guillaume Nault <gnault@redhat.com>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net] netns: fix NLM_F_ECHO mechanism for RTM_NEWNSID
Date: Wed, 9 Oct 2019 01:10:47 +0200 [thread overview]
Message-ID: <20191008231047.GB4779@linux.home> (raw)
In-Reply-To: <20191007115835.17882-1-nicolas.dichtel@6wind.com>
On Mon, Oct 07, 2019 at 01:58:35PM +0200, Nicolas Dichtel wrote:
> The flag NLM_F_ECHO aims to reply to the user the message notified to all
> listeners.
> It was not the case with the command RTM_NEWNSID, let's fix this.
>
> Fixes: 0c7aecd4bde4 ("netns: add rtnl cmd to add and get peer netns ids")
> Reported-by: Guillaume Nault <gnault@redhat.com>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
> net/core/net_namespace.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
> index a0e0d298c991..f496ce0e8da8 100644
> --- a/net/core/net_namespace.c
> +++ b/net/core/net_namespace.c
> -static void rtnl_net_notifyid(struct net *net, int cmd, int id)
> +static void rtnl_net_notifyid(struct net *net, int cmd, int id, u32 portid,
> + struct nlmsghdr *nlh)
> {
> struct net_fill_args fillargs = {
> .cmd = cmd,
We also need to set .portid and .seq otherwise rtnl_net_fill() builds
a netlink message with invalid port id and sequence number (as you
noted in your previous message).
next prev parent reply other threads:[~2019-10-08 23:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 16:02 [PATCH net-next 0/2] Ease nsid allocation Nicolas Dichtel
2019-09-30 16:02 ` [PATCH net-next 1/2] netns: move rtnl_net_get_size() and rtnl_net_fill() Nicolas Dichtel
2019-09-30 16:02 ` [PATCH net-next 2/2] netns/rtnl: return the new nsid to the user Nicolas Dichtel
2019-10-02 1:20 ` [PATCH net-next 0/2] Ease nsid allocation David Miller
2019-10-02 8:46 ` Nicolas Dichtel
2019-10-02 14:58 ` David Miller
2019-10-03 16:19 ` Guillaume Nault
2019-10-04 15:45 ` Nicolas Dichtel
2019-10-08 23:00 ` Guillaume Nault
2019-10-07 11:58 ` [PATCH net] netns: fix NLM_F_ECHO mechanism for RTM_NEWNSID Nicolas Dichtel
2019-10-08 23:10 ` Guillaume Nault [this message]
2019-10-09 8:07 ` Nicolas Dichtel
2019-10-09 13:48 ` Guillaume Nault
2019-10-09 9:19 ` [PATCH net v2] " Nicolas Dichtel
2019-10-09 13:48 ` Guillaume Nault
2019-10-10 4:06 ` Jakub Kicinski
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=20191008231047.GB4779@linux.home \
--to=gnault@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.