Hello community, here is the log from the commit of package net-snmp checked in at Thu Apr 20 17:51:41 CEST 2006. -------- --- net-snmp/net-snmp.changes 2006-04-19 14:33:35.000000000 +0200 +++ STABLE/net-snmp/net-snmp.changes 2006-04-20 16:50:38.000000000 +0200 @@ -1,0 +2,7 @@ +Thu Apr 20 16:47:31 CEST 2006 - mrueckert@suse.de + +- net-snmp-5.3.0.1_missing_ifNumber.patch: + The 5.3 agent on Linux systems did not implement the 'ifNumber' + MIB object. (#159501) + +------------------------------------------------------------------- New: ---- net-snmp-5.3.0.1_missing_ifNumber.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ net-snmp.spec ++++++ --- /var/tmp/diff_new_pack.zVDYYY/_old 2006-04-20 17:50:38.000000000 +0200 +++ /var/tmp/diff_new_pack.zVDYYY/_new 2006-04-20 17:50:38.000000000 +0200 @@ -14,7 +14,7 @@ BuildRequires: openssl-devel rpm-devel tcpd-devel License: Other License(s), see package Version: 5.3.0.1 -Release: 16 +Release: 19 Summary: SNMP Daemon Group: Productivity/Networking/Other URL: http://sourceforge.net/projects/net-snmp @@ -57,6 +57,7 @@ Patch41: net-snmp-5.3.0.1_tcpwrapper_log_severity.patch Patch42: net-snmp-5.3.0.1_ethtool.patch Patch43: net-snmp-5.3.0.1_testsuite_no_smux.patch +Patch44: net-snmp-5.3.0.1_missing_ifNumber.patch Patch60: oid-names2_5.3.patch %description @@ -133,6 +134,7 @@ %patch41 %patch42 %patch43 +%patch44 #%patch60 find -name "CVS" -type d | xargs -r %{__rm} -rfv find -name ".cvsignore" | xargs -r %{__rm} -fv @@ -310,6 +312,10 @@ %{_bindir}/mib2c-update %changelog -n net-snmp +* Thu Apr 20 2006 - mrueckert@suse.de +- net-snmp-5.3.0.1_missing_ifNumber.patch: + The 5.3 agent on Linux systems did not implement the 'ifNumber' + MIB object. (#159501) * Wed Apr 19 2006 - mrueckert@suse.de - logrotate does not like if the postrotate script returns with a non zero returncode. ++++++ net-snmp-5.3.0.1_missing_ifNumber.patch ++++++ https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1399369&group_id=12694 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 /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...