diff options
author | David Ahern <dsahern@gmail.com> | 2017-05-21 19:12:03 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-22 19:12:20 +0300 |
commit | c3ab2b4ec8f7c0700bf10957171c479bf3dbca52 (patch) | |
tree | 414dc0cf41405e9ab3ca2b3ab97d3a999cbf885a /include/linux/netlink.h | |
parent | 6d8422a175ccf2846d9460ed2b6228fe0b12c243 (diff) | |
download | linux-c3ab2b4ec8f7c0700bf10957171c479bf3dbca52.tar.xz |
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/linux/netlink.h')
-rw-r--r-- | include/linux/netlink.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 5fff5ba5964e..a68aad484c69 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); |