aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ping.c
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2013-07-03 11:12:40 -0400
committerDavid S. Miller <davem@davemloft.net>2013-07-03 20:42:05 -0400
commitfbfe80c890a1dc521d0b629b870e32fcffff0da5 (patch)
tree1479d7ded21593663a29b33a007cbe722b10037a /net/ipv6/ping.c
parenta1bdc45580fc19e968b32ad27cd7e476a4aa58f6 (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>
Diffstat (limited to 'net/ipv6/ping.c')
-rw-r--r--net/ipv6/ping.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c
index 10b975577e91..18f19df4189f 100644
--- a/net/ipv6/ping.c
+++ b/net/ipv6/ping.c
@@ -191,7 +191,10 @@ int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
191 } 191 }
192 release_sock(sk); 192 release_sock(sk);
193 193
194 return err; 194 if (err)
195 return err;
196
197 return len;
195} 198}
196 199
197#ifdef CONFIG_PROC_FS 200#ifdef CONFIG_PROC_FS