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
CRs-Fixed: 573548
Change-Id: I82b7d3a37ba91ad24e6dbd97a4880745ce16ad31
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: 68221869132d78d712d402efd53633ae8aebda20
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c
index dc9a4e4..f46e315 100644
--- a/net/ipv6/ping.c
+++ b/net/ipv6/ping.c
@@ -215,5 +215,8 @@
}
release_sock(sk);
- return err;
+ if (err)
+ return err;
+
+ return len;
}