diff options
author | Richard Alpe <richard.alpe@ericsson.com> | 2015-05-06 07:58:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-09 16:40:03 -0400 |
commit | b063bc5ea77b1c1c0e7798f641f53504d0f64bf8 (patch) | |
tree | f4b5be88e60e36a238012842e9a816fdd566ce5f /net/tipc | |
parent | 670f4f8818ee54d0c1831e3165dadd5b8a3f713e (diff) |
tipc: send explicit not supported error in nl compat
The legacy netlink API treated EPERM (permission denied) as
"operation not supported".
Reported-by: Tomi Ollila <tomi.ollila@iki.fi>
Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/netlink_compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c index 809aaf027876..53e0fee80086 100644 --- a/net/tipc/netlink_compat.c +++ b/net/tipc/netlink_compat.c | |||
@@ -1121,7 +1121,7 @@ static int tipc_nl_compat_recv(struct sk_buff *skb, struct genl_info *info) | |||
1121 | } | 1121 | } |
1122 | 1122 | ||
1123 | err = tipc_nl_compat_handle(&msg); | 1123 | err = tipc_nl_compat_handle(&msg); |
1124 | if (err == -EOPNOTSUPP) | 1124 | if ((err == -EOPNOTSUPP) || (err == -EPERM)) |
1125 | msg.rep = tipc_get_err_tlv(TIPC_CFG_NOT_SUPPORTED); | 1125 | msg.rep = tipc_get_err_tlv(TIPC_CFG_NOT_SUPPORTED); |
1126 | else if (err == -EINVAL) | 1126 | else if (err == -EINVAL) |
1127 | msg.rep = tipc_get_err_tlv(TIPC_CFG_TLV_ERROR); | 1127 | msg.rep = tipc_get_err_tlv(TIPC_CFG_TLV_ERROR); |