netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ipv6: fix wrong ping_v6_sendmsg return value
@ 2013-07-03 15:12 Lorenzo Colitti
  2013-07-04  0:42 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Colitti @ 2013-07-03 15:12 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Eric Dumazet, lorenzo

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>
---
 net/ipv6/ping.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c
index 2b52046..29d9d47 100644
--- a/net/ipv6/ping.c
+++ b/net/ipv6/ping.c
@@ -189,7 +189,10 @@ int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
 						 len);
 	}
 
-	return err;
+	if (err)
+		return err;
+
+	return len;
 }
 
 #ifdef CONFIG_PROC_FS
-- 
1.8.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: ipv6: fix wrong ping_v6_sendmsg return value
  2013-07-03 15:12 [PATCH] net: ipv6: fix wrong ping_v6_sendmsg return value Lorenzo Colitti
@ 2013-07-04  0:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-07-04  0:42 UTC (permalink / raw)
  To: lorenzo; +Cc: netdev, edumazet

From: Lorenzo Colitti <lorenzo@google.com>
Date: Thu,  4 Jul 2013 00:12:40 +0900

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-04  0:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-03 15:12 [PATCH] net: ipv6: fix wrong ping_v6_sendmsg return value Lorenzo Colitti
2013-07-04  0:42 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).