summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2013-07-04 00:12:40 +0900
committerManish Tuteja <mtuteja@nvidia.com>2014-04-01 03:12:57 -0700
commitd4473956b592be08849f64120d00dd0cf42c1c1e (patch)
tree64e52aa83edd8138bcaed9c387075c47ad6fb620
parentb4fe053967bc207fc696b93b47b951c51ab956b5 (diff)
net: ipv6: fix wrong ping_v6_sendmsg return valuedaily-2014.04.07.1_rel-roth-r4-partner
ping_v6_sendmsg currently returns 0 on success. It should return the number of bytes written instead. Bug: 9469865 Bug 1412141 Change-Id: I14aad6018f0c3fd92dad315bc3ade04c0b3982e0 Signed-off-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit 5f0fd6105f491b8b435863e98f7e96d617e3da84) Reviewed-on: http://git-master/r/336272 (cherry picked from commit 6d931659abae7575ee64b16e3c2f3ee8bd350dd1) Reviewed-on: http://git-master/r/351010 (cherry picked from commit 48c98b69c93e9b16cbdf5fdab18eaab07503ff8a) Reviewed-on: http://git-master/r/390637 Reviewed-by: Jun Su <juns@nvidia.com> Reviewed-by: Om Prakash Singh <omp@nvidia.com> Reviewed-by: Liangcai Li <liangcail@nvidia.com> Tested-by: Liangcai Li <liangcail@nvidia.com> Reviewed-by: Manish Tuteja <mtuteja@nvidia.com>
-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 1584d47a2d3d..e7a406e6443d 100644
--- a/net/ipv6/ping.c
+++ b/net/ipv6/ping.c
@@ -215,5 +215,8 @@ int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
}
release_sock(sk);
- return err;
+ if (err)
+ return err;
+
+ return len;
}