提交 a97eb33f 编写于 作者: A Anton Protopopov 提交者: David S. Miller

rtnl: RTM_GETNETCONF: fix wrong return value

An error response from a RTM_GETNETCONF request can return the positive
error value EINVAL in the struct nlmsgerr that can mislead userspace.
Signed-off-by: NAnton Protopopov <a.s.protopopov@gmail.com>
Acked-by: NCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 cfdd28be
......@@ -1847,7 +1847,7 @@ static int inet_netconf_get_devconf(struct sk_buff *in_skb,
if (err < 0)
goto errout;
err = EINVAL;
err = -EINVAL;
if (!tb[NETCONFA_IFINDEX])
goto errout;
......
......@@ -583,7 +583,7 @@ static int inet6_netconf_get_devconf(struct sk_buff *in_skb,
if (err < 0)
goto errout;
err = EINVAL;
err = -EINVAL;
if (!tb[NETCONFA_IFINDEX])
goto errout;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册