summaryrefslogtreecommitdiff
path: root/include/linux/netlink.h
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2017-05-28 01:19:28 +0300
committerDavid S. Miller <davem@davemloft.net>2017-05-30 18:55:32 +0300
commit9ae287274817c032a4428fde84d1ab26d6b96761 (patch)
tree1adfdc9ae78f4dd242fd2918047647aa3895364b /include/linux/netlink.h
parentc255bd681d1a93fff2a2c249d91449cce830ac64 (diff)
downloadlinux-9ae287274817c032a4428fde84d1ab26d6b96761.tar.xz
net: add extack arg to lwtunnel build state
Pass extack arg down to lwtunnel_build_state and the build_state callbacks. Add messages for failures in lwtunnel_build_state, and add the extarg to nla_parse where possible in the build_state callbacks. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netlink.h')
-rw-r--r--include/linux/netlink.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index a68aad484c69..8664fd26eb5d 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -102,6 +102,16 @@ struct netlink_ext_ack {
(extack)->bad_attr = (attr); \
} while (0)
+#define NL_SET_ERR_MSG_ATTR(extack, attr, msg) do { \
+ static const char __msg[] = (msg); \
+ struct netlink_ext_ack *__extack = (extack); \
+ \
+ if (__extack) { \
+ __extack->_msg = __msg; \
+ __extack->bad_attr = (attr); \
+ } \
+} while (0)
+
extern void netlink_kernel_release(struct sock *sk);
extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups);
extern int netlink_change_ngroups(struct sock *sk, unsigned int groups);