diff options
author | Paolo Abeni <pabeni@redhat.com> | 2022-11-18 19:46:08 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-11-21 14:09:07 +0100 |
commit | a3400e8746b626531099e4d9fd8eac41be066683 (patch) | |
tree | 5d1f656784dfce69f41bf29cb94beb8b1b578b78 /include/net/genetlink.h | |
parent | mptcp: deduplicate error paths on endpoint creation (diff) | |
download | linux-a3400e8746b626531099e4d9fd8eac41be066683.tar.xz linux-a3400e8746b626531099e4d9fd8eac41be066683.zip |
mptcp: more detailed error reporting on endpoint creation
Endpoint creation can fail for a number of reasons; in case of failure
append the error number to the extended ack message, using a newly
introduced generic helper.
Additionally let mptcp_pm_nl_append_new_local_addr() report different
error reasons.
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/genetlink.h')
-rw-r--r-- | include/net/genetlink.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index d21210709f84..ed4622dd4828 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h @@ -125,6 +125,9 @@ static inline void genl_info_net_set(struct genl_info *info, struct net *net) #define GENL_SET_ERR_MSG(info, msg) NL_SET_ERR_MSG((info)->extack, msg) +#define GENL_SET_ERR_MSG_FMT(info, msg, args...) \ + NL_SET_ERR_MSG_FMT((info)->extack, msg, ##args) + /* Report that a root attribute is missing */ #define GENL_REQ_ATTR_CHECK(info, attr) ({ \ struct genl_info *__info = (info); \ |