[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1372864360-9450-1-git-send-email-lorenzo@google.com>
Date: Thu, 4 Jul 2013 00:12:40 +0900
From: Lorenzo Colitti <lorenzo@...gle.com>
To: netdev@...r.kernel.org
Cc: David Miller <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, lorenzo@...gle.com
Subject: [PATCH] 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@...gle.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists