Skip to content

Commit

Permalink
xfrm_user: fix return value from xfrm_user_rcv_msg
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
  • Loading branch information
Yi Zhao authored and Steffen Klassert committed Nov 30, 2016
1 parent f2ebf2a commit 83e2d05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 83e2d05

Please sign in to comment.