[mrtg] Fix cfgmaker don't use ifHighSpeed on IBM FibreChannel switches

vcrhonek vcrhonek at fedoraproject.org
Thu Jun 28 11:47:41 UTC 2012


commit ab5b2642413be8d298b126bb47c3086641e41dbe
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date:   Thu Jun 28 13:43:31 2012 +0200

    Fix cfgmaker don't use ifHighSpeed on IBM FibreChannel switches

 mrtg-2.17.4-cfgmaker-ifhighspeed.patch |   12 ++++++++++++
 mrtg.spec                              |    8 +++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/mrtg-2.17.4-cfgmaker-ifhighspeed.patch b/mrtg-2.17.4-cfgmaker-ifhighspeed.patch
new file mode 100644
index 0000000..79c16ae
--- /dev/null
+++ b/mrtg-2.17.4-cfgmaker-ifhighspeed.patch
@@ -0,0 +1,12 @@
+diff -up mrtg-2.17.4/bin/cfgmaker.orig mrtg-2.17.4/bin/cfgmaker
+--- mrtg-2.17.4/bin/cfgmaker.orig	2012-06-28 13:26:04.457533598 +0200
++++ mrtg-2.17.4/bin/cfgmaker	2012-06-28 13:27:50.514045178 +0200
+@@ -224,7 +224,7 @@ sub InterfaceInfo($$$$$) {
+ #            maximum value (4,294,967,295) and ifHighSpeed must be used
+ #            to report the interace's speed.  For a sub-layer which has
+ #            no concept of bandwidth, this object should be zero."
+-            if ( (not defined $value) || ($value == 2**32-1) ) {
++            if ( (not defined $value) || ($value == 2**32-1) || ($value == 2**32-2)) {
+                 ($if, $value) = split /:/, $ifHighSpeed[$i], 2;
+ 	        $value = $value * 1000000;  # highSpeed = contador * 10^6
+                 debug('base',"Speed: $if - $value");
diff --git a/mrtg.spec b/mrtg.spec
index 02b736f..b03d043 100644
--- a/mrtg.spec
+++ b/mrtg.spec
@@ -6,7 +6,7 @@
 Summary:   Multi Router Traffic Grapher
 Name:      mrtg
 Version:   2.17.4
-Release:   1%{?dist}
+Release:   2%{?dist}
 URL:       http://oss.oetiker.ch/mrtg/
 Source0:   http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz
 Source1:   http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz.md5
@@ -19,6 +19,8 @@ Source8:   mrtg.service
 Source9:   mrtg.timer
 Patch0:    mrtg-2.15.0-lib64.patch
 Patch2:    mrtg-2.17.2-socket6-fix.patch
+# Patch3: some devices return 2**32-2 on ifSpeed (e. g. IBM FibreChannel switches)
+Patch3:    mrtg-2.17.4-cfgmaker-ifhighspeed.patch
 License:   GPLv2+
 Group:     Applications/Internet
 Requires(post): systemd-units
@@ -136,6 +138,10 @@ fi
 %{_unitdir}/mrtg.timer
 
 %changelog
+* Thu Jun 28 2012 Vitezslav Crhonek <vcrhonek at redhat.com> - 2.17.4-2
+- Fix cfgmaker don't use ifHighSpeed on IBM FibreChannel switches
+  (patch by Peter Bieringer)
+
 * Thu Mar 01 2012 Vitezslav Crhonek <vcrhonek at redhat.com> - 2.17.4-1
 - Update to mrtg-2.17.4
 - Use unitdir macro when creating directory for systemd units


More information about the scm-commits mailing list