From: dsahern@kernel.org
To: netdev@vger.kernel.org, davem@davemloft.net
Cc: christian@brauner.io, jbenc@redhat.com,
stephen@networkplumber.org, David Ahern <dsahern@gmail.com>
Subject: [PATCH RFC net-next 3/5] netlink: introduce NLM_F_DUMP_PROPER_HDR flag
Date: Fri, 28 Sep 2018 08:45:00 -0700 [thread overview]
Message-ID: <20180928154502.9983-4-dsahern@kernel.org> (raw)
In-Reply-To: <20180928154502.9983-1-dsahern@kernel.org>
From: David Ahern <dsahern@gmail.com>
Add a new flag, NLM_F_DUMP_PROPER_HDR, for userspace to indicate to the
kernel that it believes it is sending the right header struct for the
dump message type (ifinfomsg, ifaddrmsg, rtmsg, fib_rule_hdr, ...).
Setting the flag in the netlink message header indicates to the kernel
it should do rigid checking on all data passed in the dump request and
filter the data returned based on data passed in.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
include/uapi/linux/netlink.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
index 776bc92e9118..e722bed88dee 100644
--- a/include/uapi/linux/netlink.h
+++ b/include/uapi/linux/netlink.h
@@ -57,6 +57,7 @@ struct nlmsghdr {
#define NLM_F_ECHO 0x08 /* Echo this request */
#define NLM_F_DUMP_INTR 0x10 /* Dump was inconsistent due to sequence change */
#define NLM_F_DUMP_FILTERED 0x20 /* Dump was filtered as requested */
+#define NLM_F_DUMP_PROPER_HDR 0x40 /* Dump request has the proper header for type */
/* Modifiers to GET request */
#define NLM_F_ROOT 0x100 /* specify tree root */
--
2.11.0
next prev parent reply other threads:[~2018-09-28 22:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-28 15:44 [PATCH RFC net-next 0/5] rtnetlink: Add support for rigid checking of data in dump request dsahern
2018-09-28 15:44 ` [PATCH RFC net-next 1/5] net/netlink: Pass extack to dump callbacks dsahern
2018-09-28 18:43 ` Christian Brauner
2018-09-28 15:44 ` [PATCH RFC net-next 2/5] net/ipv6: Refactor address dump to push inet6_fill_args to in6_dump_addrs dsahern
2018-09-28 18:44 ` Christian Brauner
2018-09-28 15:45 ` dsahern [this message]
2018-09-28 15:45 ` [PATCH RFC net-next 4/5] net/ipv4: Update inet_dump_ifaddr to support NLM_F_DUMP_PROPER_HDR dsahern
2018-09-28 18:41 ` Christian Brauner
2018-09-28 18:43 ` David Ahern
2018-09-28 15:45 ` [PATCH RFC net-next 5/5] net/ipv6: Update inet6_dump_addr " dsahern
2018-09-28 18:42 ` Christian Brauner
2018-09-28 18:45 ` [PATCH RFC net-next 0/5] rtnetlink: Add support for rigid checking of data in dump request Christian Brauner
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=20180928154502.9983-4-dsahern@kernel.org \
--to=dsahern@kernel.org \
--cc=christian@brauner.io \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=jbenc@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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).