netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfrm_user: fix return value from xfrm_user_rcv_msg
@ 2016-11-29 10:09 Yi Zhao
  2016-11-30 12:15 ` Steffen Klassert
  0 siblings, 1 reply; 2+ messages in thread
From: Yi Zhao @ 2016-11-29 10:09 UTC (permalink / raw)
  To: netdev; +Cc: fan.du

It doesn't support to run 32bit 'ip' to set xfrm objdect on 64bit host.
But the return value is unknown for user program:

ip xfrm policy list
RTNETLINK answers: Unknown error 524

Replace ENOTSUPP with EOPNOTSUPP:

ip xfrm policy list
RTNETLINK answers: Operation not supported

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 net/xfrm/xfrm_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 0889209..671a1d0 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -2450,7 +2450,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
 
 #ifdef CONFIG_COMPAT
 	if (in_compat_syscall())
-		return -ENOTSUPP;
+		return -EOPNOTSUPP;
 #endif
 
 	type = nlh->nlmsg_type;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfrm_user: fix return value from xfrm_user_rcv_msg
  2016-11-29 10:09 [PATCH] xfrm_user: fix return value from xfrm_user_rcv_msg Yi Zhao
@ 2016-11-30 12:15 ` Steffen Klassert
  0 siblings, 0 replies; 2+ messages in thread
From: Steffen Klassert @ 2016-11-30 12:15 UTC (permalink / raw)
  To: Yi Zhao; +Cc: netdev, fan.du

On Tue, Nov 29, 2016 at 06:09:01PM +0800, Yi Zhao wrote:
> It doesn't support to run 32bit 'ip' to set xfrm objdect on 64bit host.
> But the return value is unknown for user program:
> 
> ip xfrm policy list
> RTNETLINK answers: Unknown error 524
> 
> Replace ENOTSUPP with EOPNOTSUPP:
> 
> ip xfrm policy list
> RTNETLINK answers: Operation not supported
> 
> Signed-off-by: Yi Zhao <yi.zhao@windriver.com>

Applied to the ipsec tree, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-30 12:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-29 10:09 [PATCH] xfrm_user: fix return value from xfrm_user_rcv_msg Yi Zhao
2016-11-30 12:15 ` Steffen Klassert

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).