Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Dec 2009 18:37:14 +0000 (UTC)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r200361 - head/sys/netinet/ipfw
Message-ID:  <200912101837.nBAIbEid071696@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luigi
Date: Thu Dec 10 18:37:14 2009
New Revision: 200361
URL: http://svn.freebsd.org/changeset/base/200361

Log:
  use div64 when converting back the burst value for userland

Modified:
  head/sys/netinet/ipfw/ip_dummynet.c

Modified: head/sys/netinet/ipfw/ip_dummynet.c
==============================================================================
--- head/sys/netinet/ipfw/ip_dummynet.c	Thu Dec 10 18:34:07 2009	(r200360)
+++ head/sys/netinet/ipfw/ip_dummynet.c	Thu Dec 10 18:37:14 2009	(r200361)
@@ -2165,7 +2165,7 @@ dummynet_get(struct sockopt *sopt)
 		 */
 		bcopy(pipe, bp, sizeof(*pipe));
 		pipe_bp->delay = (pipe_bp->delay * 1000) / hz;
-		pipe_bp->burst /= 8 * hz;
+		pipe_bp->burst = div64(pipe_bp->burst, 8 * hz);
 		/*
 		 * XXX the following is a hack based on ->next being the
 		 * first field in dn_pipe and dn_flow_set. The correct



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912101837.nBAIbEid071696>