From: David Ahern <dsahern@gmail.com>
To: Michal Kubecek <mkubecek@suse.cz>,
"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Johannes Berg <johannes.berg@intel.com>,
Jiri Pirko <jiri@mellanox.com>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
Florian Westphal <fw@strlen.de>,
netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/3] netlink: make nla_nest_start() add NLA_F_NESTED flag
Date: Fri, 26 Apr 2019 09:03:59 -0600 [thread overview]
Message-ID: <33d772e5-a2f4-c9a1-11df-27fa7baf8625@gmail.com> (raw)
In-Reply-To: <5278b013a953d4fb2e7944fc810f783d70ea52a5.1556269635.git.mkubecek@suse.cz>
On 4/26/19 3:13 AM, Michal Kubecek wrote:
> Even if the NLA_F_NESTED flag was introduced more than 11 years ago, most
> netlink based interfaces (including recently added ones) are still not
> setting it in kernel generated messages. Without the flag, message parsers
> not aware of attribute semantics (e.g. wireshark dissector or libmnl's
> mnl_nlmsg_fprintf()) cannot recognize nested attributes and won't display
> the structure of their contents.
>
> Unfortunately we cannot just add the flag everywhere as there may be
> userspace applications which check nlattr::nla_type directly rather than
> through a helper masking out the flags. Therefore the patch renames
> nla_nest_start() to nla_nest_start_noflag() and introduces nla_nest_start()
> as a wrapper adding NLA_F_NESTED. The calls which add NLA_F_NESTED manually
> are rewritten to use nla_nest_start().
>
> Except for changes in include/net/netlink.h, the patch was generated using
> this semantic patch:
>
> @@ expression E1, E2; @@
> -nla_nest_start(E1, E2)
> +nla_nest_start_noflag(E1, E2)
>
> @@ expression E1, E2; @@
> -nla_nest_start_noflag(E1, E2 | NLA_F_NESTED)
> +nla_nest_start(E1, E2)
>
> Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
> ---
Acked-by: David Ahern <dsahern@gmail.com>
next prev parent reply other threads:[~2019-04-26 15:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-26 9:13 [PATCH net-next 0/3] make nla_nest_start() add NLA_F_NESTED flag Michal Kubecek
2019-04-26 9:13 ` [PATCH net-next 1/3] netlink: " Michal Kubecek
2019-04-26 10:51 ` Jiri Pirko
2019-04-26 15:03 ` David Ahern [this message]
2019-04-26 9:13 ` [PATCH net-next 2/3] ipset: drop ipset_nest_start() and ipset_nest_end() Michal Kubecek
2019-04-26 16:59 ` Jozsef Kadlecsik
2019-04-26 9:13 ` [PATCH net-next 3/3] net: fix two coding style issues Michal Kubecek
2019-04-26 9:24 ` [PATCH net-next 0/3] make nla_nest_start() add NLA_F_NESTED flag Johannes Berg
2019-04-26 11:19 ` Michal Kubecek
2019-04-26 11:23 ` Johannes Berg
2019-04-26 11:56 ` Michal Kubecek
2019-04-26 12:17 ` Johannes Berg
2019-04-26 15:00 ` David Ahern
2019-04-26 16:02 ` Johannes Berg
2019-04-26 16:45 ` Michal Kubecek
2019-04-27 21:04 ` David Miller
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=33d772e5-a2f4-c9a1-11df-27fa7baf8625@gmail.com \
--to=dsahern@gmail.com \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=jiri@mellanox.com \
--cc=johannes.berg@intel.com \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--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).