aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDavid S. Miller <[email protected]>2017-05-30 11:55:34 -0400
committerDavid S. Miller <[email protected]>2017-05-30 11:55:34 -0400
commitb11dabfd33dd19219ba30d94cb0d2a0c34f0eefe (patch)
treebc7fda874b020c05877c925321a30e67c30c7086 /include/linux
parentf1bd4daead9a4df48d1bb2821cff3a40da543b5b (diff)
parente1af005b1ce6d33c0467808ddceb09a8a1a424ba (diff)
Merge branch 'net-more-extack'
David Ahern says: ==================== net: another round of extack handling for routing This set focuses on passing extack through lwtunnel and MPLS with additional catches for IPv4 route add and minor cleanups in MPLS encountered passing the extack arg around. v2 - mindful of bloat adding duplicate messages + refactored prefix and prefix length checks in ipv4's fib_table_insert and fib_table_del + refactored label check in mpls - split mpls cleanups into 2 patches + move nla_get_via up in af_mpls to avoid forward declaration ==================== Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'include/linux')
-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);