diff options
author | Anton Protopopov <a.s.protopopov@gmail.com> | 2016-02-16 21:43:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-19 15:33:46 -0500 |
commit | a97eb33ff225f34a8124774b3373fd244f0e83ce (patch) | |
tree | 0ddad3647e038b6fc41840e9a471d95defc54231 /net | |
parent | cfdd28beb3205dbd1e91571516807199c8ab84ca (diff) | |
download | op-kernel-dev-a97eb33ff225f34a8124774b3373fd244f0e83ce.zip op-kernel-dev-a97eb33ff225f34a8124774b3373fd244f0e83ce.tar.gz |
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: Anton Protopopov <a.s.protopopov@gmail.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/devinet.c | 2 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index cebd9d3..f6303b1 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -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; diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 9efd9ff..bdd7eac 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -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; |