diff options
author | David Ahern <dsahern@gmail.com> | 2018-10-15 18:56:41 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-16 00:13:12 -0700 |
commit | 22e6c58b8c2843337ec4e8464b1ce6e869ca5bf4 (patch) | |
tree | fa691a44c7ad64e75741c16029074bb92f2cff0a /include | |
parent | e85679511e48168b0f066b6ae585556b5e0d8f5b (diff) | |
download | linux-22e6c58b8c2843337ec4e8464b1ce6e869ca5bf4.tar.bz2 |
netlink: Add answer_flags to netlink_callback
With dump filtering we need a way to ensure the NLM_F_DUMP_FILTERED
flag is set on a message back to the user if the data returned is
influenced by some input attributes. Normally this can be done as
messages are added to the skb, but if the filter results in no data
being returned, the user could be confused as to why.
This patch adds answer_flags to the netlink_callback allowing dump
handlers to set the NLM_F_DUMP_FILTERED at a minimum in the
NLMSG_DONE message ensuring the flag gets back to the user.
The netlink_callback space is initialized to 0 via a memset in
__netlink_dump_start, so init of the new answer_flags is covered.
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netlink.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 72580f1a72a2..4da90a6ab536 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -180,6 +180,7 @@ struct netlink_callback { u16 family; u16 min_dump_alloc; bool strict_check; + u16 answer_flags; unsigned int prev_seq, seq; long args[6]; }; |