packages/utils/collectd/patches/920-fix-ping-droprate.patch
florian ce9db15947 collectd: 4.10.8 version bump
Collectd, the backbone for LuCI statistics, has been updated to 4.10.8 a few
weeks ago. I have already used it in my trunk build for some time.

Among other things 4.10.8 fixes a few memory leaks and a perl incompatibility
(see https://dev.openwrt.org/ticket/12494 ).

4.10.8 increases compatibility with current kernels and iproute2 reducing the
patch 130-fix_netlink_kernel_3.3-patch unnecessary. It can be removed.

I have also included a new patch 920-fix-ping-droprate.patch for fixing LuCI
ticket 462 (http://luci.subsignal.org/trac/ticket/462).

Signed-off-by: hannu.nyman@iki.fi
Signed-off-by: Florian Fainelli <florian@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@34487 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-12-04 16:20:55 +00:00

12 lines
436 B
Diff

--- a/src/ping.c
+++ b/src/ping.c
@@ -651,7 +651,7 @@ static int ping_read (void) /* {{{ */
/ ((double) (pkg_recv * (pkg_recv - 1))));
/* Calculate drop rate. */
- droprate = ((double) (pkg_sent - pkg_recv)) / ((double) pkg_sent);
+ droprate = ((double) (pkg_sent - pkg_recv)) * 100 / ((double) pkg_sent);
submit (hl->host, "ping", latency_average);
submit (hl->host, "ping_stddev", latency_stddev);