Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b063bc5e authored by Richard Alpe's avatar Richard Alpe Committed by David S. Miller
Browse files

tipc: send explicit not supported error in nl compat



The legacy netlink API treated EPERM (permission denied) as
"operation not supported".

Reported-by: default avatarTomi Ollila <tomi.ollila@iki.fi>
Signed-off-by: default avatarRichard Alpe <richard.alpe@ericsson.com>
Reviewed-by: default avatarErik Hugne <erik.hugne@ericsson.com>
Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 670f4f88
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1121,7 +1121,7 @@ static int tipc_nl_compat_recv(struct sk_buff *skb, struct genl_info *info)
	}

	err = tipc_nl_compat_handle(&msg);
	if (err == -EOPNOTSUPP)
	if ((err == -EOPNOTSUPP) || (err == -EPERM))
		msg.rep = tipc_get_err_tlv(TIPC_CFG_NOT_SUPPORTED);
	else if (err == -EINVAL)
		msg.rep = tipc_get_err_tlv(TIPC_CFG_TLV_ERROR);