rpms/net-snmp/FC-6 net-snmp-5.3.1-tcp-scalars.patch, NONE, 1.1 net-snmp.spec, 1.97, 1.98

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Jun 26 14:52:44 UTC 2007


Author: jsafrane

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

Modified Files:
	net-snmp.spec 
Added Files:
	net-snmp-5.3.1-tcp-scalars.patch 
Log Message:
fix snmpwalk / bulkwalk on TCP scalars
Resolves: #243316

net-snmp-5.3.1-tcp-scalars.patch:
 snmp_api.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

--- NEW FILE net-snmp-5.3.1-tcp-scalars.patch ---
Index: snmplib/snmp_api.c
===================================================================
--- snmplib/snmp_api.c	(revision 15708)
+++ snmplib/snmp_api.c	(revision 15709)
@@ -6476,15 +6476,17 @@
     int i;
     size_t min_size;
 
-    if (!in_name1 || !in_name2)
+    if (!in_name1 || !in_name2 || !len1 || !len2)
         return -1;
 
+    if (in_name1[0] != in_name2[0])
+        return 0;   /* No match */
     min_size = SNMP_MIN(len1, len2);
     for(i = 0; i < (int)min_size; i++) {
         if (in_name1[i] != in_name2[i])
-            return i + 1;
+            return i + 1;    /* Why +1 ?? */
     }
-    return 0;
+    return min_size;    /* or +1? - the spec isn't totally clear */
 }
 
 static int _check_range(struct tree *tp, long ltmp, int *resptr,


Index: net-snmp.spec
===================================================================
RCS file: /cvs/dist/rpms/net-snmp/FC-6/net-snmp.spec,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- net-snmp.spec	3 May 2007 11:28:09 -0000	1.97
+++ net-snmp.spec	26 Jun 2007 14:52:42 -0000	1.98
@@ -47,6 +47,7 @@
 Patch34: net-snmp-5.3.1-perl_bulkwalk.patch
 Patch35: net-snmp-5.3.1-hostname.patch
 Patch36: net-snmp-5.3.1-udp-endpoint.patch
+Patch37: net-snmp-5.3.1-tcp-scalars.patch
 
 Prereq: /sbin/chkconfig
 Obsoletes: ucd-snmp
@@ -59,7 +60,7 @@
 %if %{tcp_wrappers}
 BuildPrereq: tcp_wrappers
 %endif
-BuildPrereq: perl, coreutils, grep, sed, findutils
+BuildPrereq: perl, coreutils, grep, sed, findutils, rpm-devel
 
 #%define __libtoolize /bin/true
 %{expand: %%define _includedir	%{_includedir}/%{name}}
@@ -159,6 +160,7 @@
 %patch34 -p0 -b .bulkwalk
 %patch35 -p1 -b .hostname
 %patch36 -p1 -b .udp-endpoint
+%patch37 -p0 -b .tcp-scalars
 
 # Do this patch with a perl hack...
 perl -pi -e "s|'\\\$install_libdir'|'%{_libdir}'|" ltmain.sh
@@ -364,9 +366,12 @@
 %{_libdir}/lib*.so.*
 
 %changelog
-* Thu May  3 2007 Jan Safranek <jsafrane at redhat.com>
+* Thu May  3 2007 Jan Safranek <jsafranek at redhat.com>
 - fix snmptrapd hostname logging (#238587)
 - fix udpEndpointProcess remote IP address (#236551)
+- fix snmpwalk / bulkwalk on TCP scalars (#243316)
+- add build dependency on rpm-devel to support
+  hrSWInst table
 
 * Mon Mar 26 2007 Radek Vokál <rvokal at redhat.com> - 5.3.1-14
 - fix perl bulkwalk (#232913)




More information about the fedora-cvs-commits mailing list