commit | fbfe80c890a1dc521d0b629b870e32fcffff0da5 | [log] [tgz] |
---|---|---|
author | Lorenzo Colitti <lorenzo@google.com> | Thu Jul 04 00:12:40 2013 +0900 |
committer | David S. Miller <davem@davemloft.net> | Wed Jul 03 17:42:05 2013 -0700 |
tree | 1479d7ded21593663a29b33a007cbe722b10037a | |
parent | a1bdc45580fc19e968b32ad27cd7e476a4aa58f6 [diff] |
net: ipv6: fix wrong ping_v6_sendmsg return value ping_v6_sendmsg currently returns 0 on success. It should return the number of bytes written instead. Signed-off-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c index 10b9755..18f19df 100644 --- a/net/ipv6/ping.c +++ b/net/ipv6/ping.c
@@ -191,7 +191,10 @@ } release_sock(sk); - return err; + if (err) + return err; + + return len; } #ifdef CONFIG_PROC_FS