]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
netlink: Introduce nlmsg_payload helper
authorBreno Leitao <leitao@debian.org>
Mon, 14 Apr 2025 13:24:07 +0000 (06:24 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 15 Apr 2025 15:28:53 +0000 (08:28 -0700)
commit95d06e92a401928fe46fda7616e460f39cb7211b
treeaa3480121f0234badab9853aa82962929b0b3020
parent0418711f60bbc6c35ba21fc78c6e3bc913036d2f
netlink: Introduce nlmsg_payload helper

Create a new helper function, nlmsg_payload(), to simplify checking and
retrieving Netlink message payloads.

This reduces boilerplate code for users who need to verify the message
length before accessing its data.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250414-nlmsg-v2-1-3d90cb42c6af@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/netlink.h