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
48 * @nlmsg_flags: Additional flags48 * @nlmsg_flags: Additional flags
49 * @nlmsg_seq: Sequence number49 * @nlmsg_seq: Sequence number
50 * @nlmsg_pid: Sending process port ID50 * @nlmsg_pid: Sending process port ID
51 * @nlmsg_data: Message payload
51 */52 */
52struct nlmsghdr {53struct nlmsghdr {
53 __u32 nlmsg_len;54 __u32 nlmsg_len;
@@ -55,6 +56,7 @@ struct nlmsghdr { · 1 unmodified line
55 __u16 nlmsg_flags;56 __u16 nlmsg_flags;
56 __u32 nlmsg_seq;57 __u32 nlmsg_seq;
57 __u32 nlmsg_pid;58 __u32 nlmsg_pid;
59 __u8 nlmsg_data[];
58};60};
59 61
60/* Flags values */62/* Flags values */