rpms/net-snmp/devel net-snmp-5.3.0.1-ifnumber.patch, NONE, 1.1 net-snmp.spec, 1.70, 1.71
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Sat Apr 15 11:10:10 UTC 2006
Author: rvokal
Update of /cvs/dist/rpms/net-snmp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv15885
Modified Files:
net-snmp.spec
Added Files:
net-snmp-5.3.0.1-ifnumber.patch
Log Message:
- fix missing IF-MIB::ifNumber.0 (#189007)
net-snmp-5.3.0.1-ifnumber.patch:
ifTable.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
ifTable_constants.h | 1 +
2 files changed, 46 insertions(+)
--- NEW FILE net-snmp-5.3.0.1-ifnumber.patch ---
Index: agent/mibgroup/if-mib/ifTable/ifTable.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/if-mib/ifTable/ifTable.c,v
retrieving revision 1.25
diff -u -p -r1.25 ifTable.c
--- agent/mibgroup/if-mib/ifTable/ifTable.c 25 Jan 2006 16:25:54 -0000 1.25
+++ agent/mibgroup/if-mib/ifTable/ifTable.c 13 Feb 2006 23:49:45 -0000
@@ -44,6 +44,12 @@ ifTable_registration ifTable_user_contex
void initialize_table_ifTable(void);
void shutdown_table_ifTable(void);
+static int
+_if_number_handler(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info *reqinfo,
+ netsnmp_request_info *requests);
+
/**
* Initializes the ifTable module
@@ -135,6 +141,24 @@ initialize_table_ifTable(void)
* call interface initialization code
*/
_ifTable_initialize_interface(user_context, flags);
+
+ /*
+ * register scalar for ifNumber
+ */
+ {
+ oid reg_oid[] =
+ { IFTABLE_NUMBER };
+ netsnmp_handler_registration *myreg;
+
+ myreg =
+ netsnmp_create_handler_registration("if number",
+ _if_number_handler,
+ ®_oid,
+ OID_LENGTH(reg_oid),
+ HANDLER_CAN_RONLY);
+ netsnmp_register_instance(myreg);
+ }
+
} /* initialize_table_ifTable */
/**
@@ -2302,5 +2326,26 @@ ifTable_check_dependencies(ifTable_rowre
return rc;
} /* ifTable_check_dependencies */
+
+static int
+_if_number_handler(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info *reqinfo,
+ netsnmp_request_info *requests)
+{
+ if (MODE_GET == reqinfo->mode) {
+ int val = ifTable_container_size();
+ snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
+ (u_char *) &val, sizeof(val));
+ } else
+ netsnmp_assert("bad mode in RO handler");
+
+ if (handler->next && handler->next->access_method)
+ return netsnmp_call_next_handler(handler, reginfo, reqinfo,
+ requests);
+
+ return SNMP_ERR_NOERROR;
+}
+
/** @} */
/** @{ */
Index: agent/mibgroup/if-mib/ifTable/ifTable_constants.h
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/if-mib/ifTable/ifTable_constants.h,v
retrieving revision 1.9
diff -u -p -r1.9 ifTable_constants.h
--- agent/mibgroup/if-mib/ifTable/ifTable_constants.h 29 Nov 2005 22:14:32 -0000 1.9
+++ agent/mibgroup/if-mib/ifTable/ifTable_constants.h 13 Feb 2006 23:49:45 -0000
@@ -15,6 +15,7 @@ extern "C" {
* scalars
*/
#define IFTABLE_LAST_CHANGE 1,3,6,1,2,1,31,1,5
+#define IFTABLE_NUMBER 1,3,6,1,2,1,2,1,0
/*
Index: net-snmp.spec
===================================================================
RCS file: /cvs/dist/rpms/net-snmp/devel/net-snmp.spec,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- net-snmp.spec 5 Apr 2006 09:02:01 -0000 1.70
+++ net-snmp.spec 15 Apr 2006 11:10:07 -0000 1.71
@@ -3,7 +3,7 @@
Summary: A collection of SNMP protocol tools and libraries.
Name: net-snmp
Version: 5.3
-Release: 7
+Release: 8
License: BSDish
Group: System Environment/Daemons
@@ -36,6 +36,7 @@
Patch27: net-snmp-5.3-oid-names.patch
Patch28: net-snmp-5.3-disman.patch
Patch29: net-snmp-5.3-diskio.patch
+Patch30: net-snmp-5.3.0.1-ifnumber.patch
Prereq: /sbin/chkconfig
Obsoletes: ucd-snmp
@@ -145,6 +146,7 @@
%patch27 -p0 -b .oid
%patch28 -p1 -b .disman
%patch29 -p1 -b .diskio
+%patch30 -p0 -b .ifnumbed
# Do this patch with a perl hack...
perl -pi -e "s|'\\\$install_libdir'|'%{_libdir}'|" ltmain.sh
@@ -327,6 +329,9 @@
%{_libdir}/*.a
%changelog
+* Sat Apr 15 2006 Radek Vokál <rvokal at redhat.com> 5.3-8
+- fix missing IF-MIB::ifNumber.0 (#189007)
+
* Wed Apr 05 2006 Radek Vokál <rvokal at redhat.com> 5.3-7
- fix parsing of /proc/diskstats
- fix disman monitor crash
More information about the fedora-cvs-commits
mailing list