diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2013-07-04 00:12:40 +0900 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2016-03-11 15:57:02 +0100 |
commit | 2ac38dd9eb30e8a466e6b615326f2a180753d80f (patch) | |
tree | 38d2e5dd2a735469039be982d05bcb662adbcef0 /net | |
parent | 8631edfba577d72ff1c38398115239d6718490b9 (diff) | |
download | kernel_samsung_espresso10-2ac38dd9eb30e8a466e6b615326f2a180753d80f.zip kernel_samsung_espresso10-2ac38dd9eb30e8a466e6b615326f2a180753d80f.tar.gz kernel_samsung_espresso10-2ac38dd9eb30e8a466e6b615326f2a180753d80f.tar.bz2 |
net: ipv6: fix wrong ping_v6_sendmsg return value
[net-next commit fbfe80c890a1dc521d0b629b870e32fcffff0da5]
ping_v6_sendmsg currently returns 0 on success. It should return
the number of bytes written instead.
Bug: 9469865
Change-Id: I82b7d3a37ba91ad24e6dbd97a4880745ce16ad31
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/ping.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c index c0f329b..bc30c4b 100644 --- a/net/ipv6/ping.c +++ b/net/ipv6/ping.c @@ -210,5 +210,8 @@ int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, } release_sock(sk); - return err; + if (err) + return err; + + return len; } |