summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2017-05-21 10:12:03 -0600
committerDavid S. Miller <davem@davemloft.net>2017-05-22 12:12:20 -0400
commitc3ab2b4ec8f7c0700bf10957171c479bf3dbca52 (patch)
tree414dc0cf41405e9ab3ca2b3ab97d3a999cbf885a /include
parent6d8422a175ccf2846d9460ed2b6228fe0b12c243 (diff)
downloadop-kernel-dev-c3ab2b4ec8f7c0700bf10957171c479bf3dbca52.zip
op-kernel-dev-c3ab2b4ec8f7c0700bf10957171c479bf3dbca52.tar.gz
net: ipv4: Add extack messages for route add failures
Add messages for non-obvious errors (e.g, no need to add text for malloc failures or ENODEV failures). This mostly covers the annoying EINVAL errors Some message strings violate the 80-columns but searchable strings need to trump that rule. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netlink.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 5fff5ba..a68aad4 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -97,6 +97,11 @@ struct netlink_ext_ack {
#define NL_SET_ERR_MSG_MOD(extack, msg) \
NL_SET_ERR_MSG((extack), KBUILD_MODNAME ": " msg)
+#define NL_SET_BAD_ATTR(extack, attr) do { \
+ if ((extack)) \
+ (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);
OpenPOWER on IntegriCloud