rpms/net-snmp/devel net-snmp-5.3-diskio.patch, NONE, 1.1 net-snmp-5.3-disman.patch, NONE, 1.1 net-snmp-5.3-oid-names.patch, NONE, 1.1 net-snmp-5.3_vendorperl.patch, NONE, 1.1 net-snmp.spec, 1.69, 1.70

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Apr 5 09:02:26 UTC 2006


Author: rvokal

Update of /cvs/dist/rpms/net-snmp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv32472

Modified Files:
	net-snmp.spec 
Added Files:
	net-snmp-5.3-diskio.patch net-snmp-5.3-disman.patch 
	net-snmp-5.3-oid-names.patch net-snmp-5.3_vendorperl.patch 
Log Message:
 - fix parsing of /proc/diskstats
 - fix disman monitor crash
 - fix perl vendor name
 - fix OID lookup fail



net-snmp-5.3-diskio.patch:
 diskio.c |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

--- NEW FILE net-snmp-5.3-diskio.patch ---
--- net-snmp/agent/mibgroup/ucd-snmp/diskio.c.old	2006-03-29 18:19:46.000000000 +0200
+++ net-snmp/agent/mibgroup/ucd-snmp/diskio.c	2006-03-29 17:36:01.000000000 +0200
@@ -721,8 +721,16 @@
 		head.indices = (linux_diskio *)realloc(head.indices, head.alloc*sizeof(linux_diskio));
 	    }
 	    pTemp = &head.indices[head.length];
-	    sscanf (buffer, "%d %d", &pTemp->major, &pTemp->minor);
-	    if (pTemp->minor == 0)
+	    /* we count space separator to identify type */
+	    int i=0;
+	    int space=0;
+	    char last='\0';
+	    while(buffer[i] != '\n') {
+	        if(buffer[i] == ' ' && last != ' ')
+	            space++;
+		last = buffer[i++];
+	    }
+	    if (space > 7)
 		sscanf (buffer, "%d %d %s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu\n",
 		    &pTemp->major, &pTemp->minor, pTemp->name,
 		    &pTemp->rio, &pTemp->rmerge, &pTemp->rsect, &pTemp->ruse,
@@ -784,6 +792,7 @@
 {
     unsigned int indx;
     static unsigned long long_ret;
+    static struct counter64 c64_ret;
 
     if (getstats() == 1) {
 	return NULL;
@@ -818,7 +827,16 @@
     case DISKIO_WRITES:
       long_ret = head.indices[indx].wio;
       return (u_char *) & long_ret;
-
+    case DISKIO_NREADX:
+      *var_len = 8;
+      c64_ret.low = head.indices[indx].rsect * 512 & 0xffffffff;
+      c64_ret.high = head.indices[indx].rsect * 512 >> 32;
+      return (u_char *) & c64_ret;
+    case DISKIO_NWRITTENX:
+      *var_len = 8;
+      c64_ret.low = head.indices[indx].wsect * 512 & 0xffffffff;
+      c64_ret.high = head.indices[indx].wsect * 512 >> 32;
+      return (u_char *) & c64_ret;
     default:
 	snmp_log(LOG_ERR, "diskio.c: don't know how to handle %d request\n", vp->magic);
   }

net-snmp-5.3-disman.patch:
 mteTrigger.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletion(-)

--- NEW FILE net-snmp-5.3-disman.patch ---
--- net-snmp-5.3/agent/mibgroup/disman/event/mteTrigger.c.orig	2005-12-11 20:13:15.000000000 +0100
+++ net-snmp-5.3/agent/mibgroup/disman/event/mteTrigger.c	2006-04-05 10:22:24.000000000 +0200
@@ -741,6 +741,11 @@
             /*
              * Determine the value to be monitored...
              */
+            if ( !vp1->val.integer ) {  /* No value */
+                if ( vp2 )
+                    vp2 = vp2->next_variable;
+                continue;
+            }
             if (entry->flags & MTE_TRIGGER_FLAG_DELTA) {
                 if (entry->flags & MTE_TRIGGER_FLAG_DWILD) {
                     /*
@@ -873,6 +878,11 @@
             /*
              * Determine the value to be monitored...
              */
+            if ( !vp1->val.integer ) {  /* No value */
+                if ( vp2 )
+                    vp2 = vp2->next_variable;
+                continue;
+            }
             if (entry->flags & MTE_TRIGGER_FLAG_DELTA) {
                 if (entry->flags & MTE_TRIGGER_FLAG_DWILD) {
                     /*
@@ -994,7 +1004,11 @@
              *  (similar to previous delta-sample processing,
              *   but without the discontinuity marker checks)
              */
-            if (vp2->type == ASN_NULL) {
+            if (!vp2) {
+                break;   /* Run out of 'old' values */
+            }
+            if (( !vp1->val.integer ) ||
+                (vp2->type == ASN_NULL)) {
                 vp2 = vp2->next_variable;
                 continue;
             }

net-snmp-5.3-oid-names.patch:
 mib.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

--- NEW FILE net-snmp-5.3-oid-names.patch ---
Index: snmplib/mib.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/snmplib/mib.c,v
retrieving revision 5.89
diff -u -p -r5.89 mib.c
--- snmplib/mib.c	2 Dec 2005 10:33:57 -0000	5.89
+++ snmplib/mib.c	2 Feb 2006 14:20:38 -0000
@@ -2861,7 +2861,7 @@ int
 read_objid(const char *input, oid * output, size_t * out_len)
 {                               /* number of subid's in "output" */
 #ifndef DISABLE_MIB_LOADING
-    struct tree    *root = tree_head;
+    struct tree    *root = tree_top;
 #endif /* DISABLE_MIB_LOADING */
     char            buf[SPRINT_MAX_LEN];
     int             ret, max_out_len;
@@ -2904,7 +2904,10 @@ read_objid(const char *input, oid * outp
 #endif /* DISABLE_MIB_LOADING */
 
 #ifndef DISABLE_MIB_LOADING
-    if (root == NULL) {
+    if ((root == NULL) && (tree_head != NULL)) {
+        root = tree_head;
+    }
+    else if (root == NULL) {
         SET_SNMP_ERROR(SNMPERR_NOMIB);
         *out_len = 0;
         return 0;

net-snmp-5.3_vendorperl.patch:
 Makefile.in |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE net-snmp-5.3_vendorperl.patch ---
Index: Makefile.in
===================================================================
--- Makefile.in.orig
+++ Makefile.in
@@ -167,7 +167,7 @@
         fi
 
 perlinstall:
-	@(cd perl ; $(MAKE) install) ; \
+	@(cd perl ; $(MAKE) install_vendor) ; \
         if test $$? != 0 ; then \
            exit 1 ; \
         fi


Index: net-snmp.spec
===================================================================
RCS file: /cvs/dist/rpms/net-snmp/devel/net-snmp.spec,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- net-snmp.spec	25 Mar 2006 10:07:13 -0000	1.69
+++ net-snmp.spec	5 Apr 2006 09:02:01 -0000	1.70
@@ -3,7 +3,7 @@
 Summary: A collection of SNMP protocol tools and libraries.
 Name: net-snmp
 Version: 5.3
-Release: 6
+Release: 7
 
 License: BSDish
 Group: System Environment/Daemons
@@ -32,6 +32,10 @@
 Patch23: net-snmp-5.3-proc_if_inet6.patch
 Patch24: net-snmp-5.3-size_t.patch
 Patch25: net-snmp-5.3-ipv6_retrans_ms.patch
+Patch26: net-snmp-5.3_vendorperl.patch
+Patch27: net-snmp-5.3-oid-names.patch
+Patch28: net-snmp-5.3-disman.patch
+Patch29: net-snmp-5.3-diskio.patch
 
 Prereq: /sbin/chkconfig
 Obsoletes: ucd-snmp
@@ -137,6 +141,10 @@
 %patch23 -p1 -b .proc_if
 %patch24 -p1 -b .size_t
 %patch25 -p1 -b .retrans_ms
+%patch26 -p0
+%patch27 -p0 -b .oid
+%patch28 -p1 -b .disman
+%patch29 -p1 -b .diskio
 
 # Do this patch with a perl hack...
 perl -pi -e "s|'\\\$install_libdir'|'%{_libdir}'|" ltmain.sh
@@ -319,6 +327,12 @@
 %{_libdir}/*.a
 
 %changelog
+* Wed Apr 05 2006 Radek Vokál <rvokal at redhat.com> 5.3-7
+- fix parsing of /proc/diskstats
+- fix disman monitor crash
+- fix perl vendor name
+- fix OID lookup fail
+
 * Sat Mar 25 2006 Radek Vokal <rvokal at redhat.com> 5.3-6
 - use net.ipv6.neigh.lo.retrans_time_ms (#186546)
 




More information about the fedora-cvs-commits mailing list