ports/81117: net-mgmt/mrtg major bugfix -- rateup generates broken graphs

Jeremy Chadwick freebsd at jdc.parodius.com
Mon May 16 18:00:25 UTC 2005


>Number:         81117
>Category:       ports
>Synopsis:       net-mgmt/mrtg major bugfix -- rateup generates broken graphs
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 16 18:00:20 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 4.11-STABLE i386
>Organization:
Parodius Networking
>Environment:
System: FreeBSD pentarou.parodius.com 4.11-STABLE FreeBSD 4.11-STABLE #0: Thu May 12 04:37:52 PDT 2005 root at pentarou.parodius.com:/usr/obj/usr/src/sys/PENTAROU i386
>Description:
	mrtg 2.12.0 contains broken rateup code, and also generates improper CSS,
	plus does not "decently" support setups where XSize/YSize are used in
	mrtg.cfg (the newly-added CSS hard-codes width/height of 500x135, rather
	than letting the browser figure it out).

	In the meantime, below is the patch for rateup.c which fixes the
	problem of graphs being drawn as if "Unscaled" was set.  The other few
	bugs will have to wait, as they're cosmetic, although the XSize/YSize
	one is quite annoying...

	All of these problems will be addressed in 2.12.1 says Tobias, as I've
	been in Email contact with him quite a lot this morning about such
	problems.
>How-To-Repeat:
	Generate some graphs and see what I mean.  :-)
>Fix:
	Add this patch to files/, naturally.  This comes from Tobias, BTW.


--- src/rateup.c~   2005-05-16 19:15:06.468444000 +0200
+++ src/rateup.c    2005-05-16 19:15:09.138421000 +0200
@@ -318,6 +318,7 @@
     }

   /* multiplicator for bits/bytes */
+  maxv = (long long) max (maxvi, maxvo);
   maxvi = maxvi < (long long) 0 ? -maxvi : maxvi;
   maxvo = maxvo < (long long) 0 ? -maxvo : maxvo;
   origmaxvi = maxvi;
@@ -328,7 +329,6 @@
       maxvi *= muli;
       maxvo *= muli;
     }
-  maxv = (long long) max (maxvi, maxvo);
   if (step > MONTH_SAMPLE)
     {
       type = 4;
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list