aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/netlink.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-03-25 18:58:11 -0700
committerDavid S. Miller <davem@davemloft.net>2020-03-25 18:58:11 -0700
commit9fb16955fb661945ddffce4504dcffbe55cd518a (patch)
treee0811476a96a9411686e24f15a48d63cc6d02e49 /include/linux/netlink.h
parentcxgb4: Add support to catch bits set in INT_CAUSE5 (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff)
downloadwireguard-linux-9fb16955fb661945ddffce4504dcffbe55cd518a.tar.xz
wireguard-linux-9fb16955fb661945ddffce4504dcffbe55cd518a.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Overlapping header include additions in macsec.c A bug fix in 'net' overlapping with the removal of 'version' string in ena_netdev.c Overlapping test additions in selftests Makefile Overlapping PCI ID table adjustments in iwlwifi driver. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netlink.h')
-rw-r--r--include/linux/netlink.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 788969ccbbde..e3e49f0e5c13 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -115,6 +115,19 @@ static inline void nl_set_extack_cookie_u64(struct netlink_ext_ack *extack,
{
u64 __cookie = cookie;
+ if (!extack)
+ return;
+ memcpy(extack->cookie, &__cookie, sizeof(__cookie));
+ extack->cookie_len = sizeof(__cookie);
+}
+
+static inline void nl_set_extack_cookie_u32(struct netlink_ext_ack *extack,
+ u32 cookie)
+{
+ u32 __cookie = cookie;
+
+ if (!extack)
+ return;
memcpy(extack->cookie, &__cookie, sizeof(__cookie));
extack->cookie_len = sizeof(__cookie);
}