From: Lorenzo Colitti <lorenzo@google.com>
To: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
lorenzo@google.com
Subject: [PATCH] net: ipv6: fix wrong ping_v6_sendmsg return value
Date: Thu, 4 Jul 2013 00:12:40 +0900 [thread overview]
Message-ID: <1372864360-9450-1-git-send-email-lorenzo@google.com> (raw)
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
next reply other threads:[~2013-07-03 15:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 15:12 Lorenzo Colitti [this message]
2013-07-04 0:42 ` [PATCH] net: ipv6: fix wrong ping_v6_sendmsg return value David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1372864360-9450-1-git-send-email-lorenzo@google.com \
--to=lorenzo@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).