netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <richard.alpe@ericsson.com>
To: <netdev@vger.kernel.org>
Cc: <tipc-discussion@lists.sourceforge.net>,
	Richard Alpe <richard.alpe@ericsson.com>
Subject: [PATCH net-next 3/3] tipc: send explicit not supported error in nl compat
Date: Wed, 6 May 2015 13:58:56 +0200	[thread overview]
Message-ID: <1430913536-4206-3-git-send-email-richard.alpe@ericsson.com> (raw)
In-Reply-To: <1430913536-4206-1-git-send-email-richard.alpe@ericsson.com>

From: Richard Alpe <richard.alpe@ericsson.com>

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>
---
 net/tipc/netlink_compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
index 809aaf0..53e0fee 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)
 	}
 
 	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);
-- 
2.1.4

  parent reply	other threads:[~2015-05-06 12:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06 11:58 [PATCH net-next 1/3] tipc: fix default link prop regression in nl compat richard.alpe
2015-05-06 11:58 ` [PATCH net-next 2/3] tipc: add broadcast link window set/get to nl api richard.alpe
2015-05-09 20:40   ` David Miller
2015-05-06 11:58 ` richard.alpe [this message]
2015-05-09 20:40   ` [PATCH net-next 3/3] tipc: send explicit not supported error in nl compat David Miller
2015-05-09 20:40 ` [PATCH net-next 1/3] tipc: fix default link prop regression " David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1430913536-4206-3-git-send-email-richard.alpe@ericsson.com \
    --to=richard.alpe@ericsson.com \
    --cc=netdev@vger.kernel.org \
    --cc=tipc-discussion@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).