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

Commit a97eb33f authored by Anton Protopopov's avatar Anton Protopopov Committed by David S. Miller
Browse files

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: default avatarAnton Protopopov <a.s.protopopov@gmail.com>
Acked-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cfdd28be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -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;