History

netlink: split up copies in the ack construction

Clean up the use of unsafe_memcpy() by adding a flexible array at the end of netlink message header and splitting up the header and data copies.

Jakub Kicinski committed 4 years ago

Commit 738136a1 parent eca485d3 files · +43 −9Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/netlink.h+2−0
@@ -48,6 +48,7 @@ struct sockaddr_nl { · 47 unmodified lines
4848 * @nlmsg_flags: Additional flags
4949 * @nlmsg_seq: Sequence number
5050 * @nlmsg_pid: Sending process port ID
51+ * @nlmsg_data: Message payload
5152 */
5253 struct nlmsghdr {
5354 __u32 nlmsg_len;
@@ -55,6 +56,7 @@ struct nlmsghdr { · 1 unmodified line
5556 __u16 nlmsg_flags;
5657 __u32 nlmsg_seq;
5758 __u32 nlmsg_pid;
59+ __u8 nlmsg_data[];
5860 };
5961
6062 /* Flags values */