netsnmp_linux_interface_get_if_speed will cause stack corrupt

2007-07-12 Thread 吴亚东
I use net-snmp-5.4 on linux-2.6.16 with sk98lin driver. If link of some interface is off, snmpd will core dump periodically. After investigation, I find that netsnmp_linux_interface_get_if_speed will cause stack corrupt. If link is off, speed returned by ETHTOOL_GSET will be 0(not 10 100 1000). A

netsnmp_linux_interface_get_if_speed will cause stack corrupt

2007-07-12 Thread Yadong Wu
I use net-snmp-5.4 on linux-2.6.16 with sk98lin driver. If link of some interface is off, snmpd will core dump periodically. After investigation, I find that netsnmp_linux_interface_get_if_speed will cause stack corrupt. If link is off, speed returned by ETHTOOL_GSET will be 0(not 10 100 1000).

Re: Off by one bug in util_funcs.c:check_and_reload_table() call to qsort()

2007-07-12 Thread Thomas Anders
Glenn wrote: > The fix is to change table->next_index to table->next_index-1. We've > tried this fix locally and it definitely solved our problems. I've > submitted patch 1752934 with this fix. Much appreciated. We'll look at applying that patch once 5.4.1 is out of the door. +Thomas

Off by one bug in util_funcs.c:check_and_reload_table() call to qsort()

2007-07-12 Thread Glenn
We've had this intermittent bug in our of our custom MIB implementations that has been driving us nuts for some time. We just recently managed to get valgrind on the embedded device and we discovered a problem in the net-snmp library. The MIB in question was written some time ago and it makes

snmp basic question.

2007-07-12 Thread Siva Prakash Reddy G
Hi! It is Basic question in snmp. when two snmp managers trying to set a variable on same snmp agent at the same time. how request will be processed. I am using latest net-snmp source code that is net-snmp5.3.1. in this code i couldn't found. If any body kno

Net-SNMP 5.3 Dumping core, Any Ideas?

2007-07-12 Thread Jayson Robinson
Got some rather large cores (4gb) from one of our net-snmp 5.3 boxes. Apparently they have been doing this randomly. I have at least 4 core files and I have pulled the backtrace on the core file and was wondering if anyone has any ideas.Core was generated by `snmpd'.Program terminated with

5.4 UCD ext OID hangs in asn_realloc_rbuild_string

2007-07-12 Thread Leland Wallace
Robert here's the bug url. http://sourceforge.net/tracker/index.php?func=detail&aid=1752162&group_id=12694&atid=112694 looping in asn_realloc_rbuild_string using up 90+% of CPU and eating up memory at about 1 Meg every 5 seconds backtrace for the hang is: #0 0x8c10 in __memcpy () #1 0x0017ae0

Re: Compiling MFD subagent produces "row_merge" and "lmSensors" errors

2007-07-12 Thread Need Help
I noticed the following: a) when the subagent is being compiled, it will look for the library files in the "/usr/local/lib" directory instead of the "/export/home/rosent1/snmp/usr/local/lib" directory where the library files were created. Basically, I must copy the library files into the "/u

Re: Compiling MFD subagent produces "row_merge" and "lmSensors" errors

2007-07-12 Thread Need Help
As for (2) below, I realized I recently deleted all the library files from the "/usr/local/lib/" directory from existing since I thought they were not being used since the library files which should be used by the subagent were the files located in the "/export/home/rosent1/snmp/usr/local/lib/"

Re: Compiling MFD subagent produces "row_merge" and "lmSensors" errors

2007-07-12 Thread Need Help
1) What do you mean by "You can copy the prototypes from the appropriate headers, if you want to eliminate the warning". What do I copy from where? Do you mean to simply add the #include files to the subagent.c file? 2) The following library files are located in the "/export/home/rosent1/snm

Re: Compiling MFD subagent produces "row_merge" and "lmSensors" errors

2007-07-12 Thread Robert Story
On Thu, 12 Jul 2007 08:28:25 -0700 (PDT) Need wrote: NH> gcc -I. `net-snmp-config --base-cflags` -Wall -Wstrict-prototypes -c -o ocStbHostMib_subagent.o ocStbHostMib_subagent.c NH> ocStbHostMib_subagent.c: In function `main': NH> ocStbHostMib_subagent.c:76: warning: implicit declaration of funct

Re: Shall I recreate MFD code for tables/scalars once I upgrade to the next NetSNMP version?

2007-07-12 Thread Robert Story
On Thu, 12 Jul 2007 07:49:11 -0700 (PDT) Need wrote: NH> Anyway, my question is, once a new officially supported NetSNMP version is released then must I regenerate all of the code using the "mib2c.mfd.conf" configuration file? Or perhaps the MFD code did not change in this next release and I wi

Compiling MFD subagent produces "row_merge" and "lmSensors" errors

2007-07-12 Thread Need Help
I have progressed but have another problem. I used mib2c with the MFD configuration file to generate code for three tables (ocStbHostAVInterfaceTable, ocStbHostAnalogVideoTable and ocStbHostComponentTable) and one scalar (ocStbHostHWIdentifiers). I am compiling on my PC (ie: not cross-compilin

Shall I recreate MFD code for tables/scalars once I upgrade to the next NetSNMP version?

2007-07-12 Thread Need Help
I need to upgrade to the next NetSNMP version when it is released since it has an important "../agent/mibgroup/Makefile" change which will allow all of the ".o" and ".lo" files to be deleted when a "make clean" requested is issued. The current v5.4 version does not handle "make clean" correctly

Re: Using "--disable-shared" results in library files not being produced

2007-07-12 Thread Need Help
Ok, I think I figured this one out. Seems like the library files were not being produced since the agent/mibgroup ".o" and ".lo" files were not being removed due to the make clean request. I fixed this error in the Makefile one time but have since performed a "./configure" again which wiped

Re: Extend the agent with a c file using a shared library

2007-07-12 Thread Thomas Anders
BAUDRY Charles wrote: > /usr/bin/ld: fsprpc_clnt.a(fsprpc_c.o): Relocations in generic ELF (EM: 20) > fsprpc_clnt.a: could not read symbols: File in wrong format > collect2: ld returned 1 exit status > make: *** [snmpd] Error 1 We don't know anything about your fsprpc_clnt.a and/or your platform,

Re: Extend the agent with a c file using a shared library

2007-07-12 Thread BAUDRY Charles
Hello I tried to add my library with the options --with-ldflags=-L/path/to/dir --with-libs=fsprpc_clnt.a It didn't work and the make step failed, it says that it doesn't find the file. As said in the previous message, the ./configure find the file but not the make... I searched in the mailing lis