From: David Ahern <dsah...@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 <dsah...@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