You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(14) |
Nov
(315) |
Dec
(298) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(254) |
Feb
(467) |
Mar
(430) |
Apr
(345) |
May
(406) |
Jun
(336) |
Jul
(313) |
Aug
(265) |
Sep
(433) |
Oct
(462) |
Nov
(387) |
Dec
(232) |
2002 |
Jan
(352) |
Feb
(556) |
Mar
(463) |
Apr
(500) |
May
(557) |
Jun
(337) |
Jul
(317) |
Aug
(279) |
Sep
(273) |
Oct
(354) |
Nov
(267) |
Dec
(347) |
2003 |
Jan
(351) |
Feb
(445) |
Mar
(520) |
Apr
(665) |
May
(499) |
Jun
(393) |
Jul
(304) |
Aug
(425) |
Sep
(262) |
Oct
(329) |
Nov
(220) |
Dec
(174) |
2004 |
Jan
(365) |
Feb
(479) |
Mar
(515) |
Apr
(522) |
May
(214) |
Jun
(471) |
Jul
(292) |
Aug
(341) |
Sep
(243) |
Oct
(446) |
Nov
(294) |
Dec
(147) |
2005 |
Jan
(171) |
Feb
(209) |
Mar
(218) |
Apr
(321) |
May
(233) |
Jun
(534) |
Jul
(268) |
Aug
(345) |
Sep
(498) |
Oct
(557) |
Nov
(459) |
Dec
(238) |
2006 |
Jan
(288) |
Feb
(180) |
Mar
(151) |
Apr
(113) |
May
(164) |
Jun
(277) |
Jul
(160) |
Aug
(383) |
Sep
(221) |
Oct
(404) |
Nov
(358) |
Dec
(163) |
2007 |
Jan
(293) |
Feb
(175) |
Mar
(202) |
Apr
(155) |
May
(427) |
Jun
(484) |
Jul
(414) |
Aug
(125) |
Sep
(131) |
Oct
(160) |
Nov
(79) |
Dec
(70) |
2008 |
Jan
(133) |
Feb
(115) |
Mar
(158) |
Apr
(194) |
May
(197) |
Jun
(230) |
Jul
(146) |
Aug
(68) |
Sep
(93) |
Oct
(53) |
Nov
(95) |
Dec
(69) |
2009 |
Jan
(81) |
Feb
(162) |
Mar
(215) |
Apr
(216) |
May
(78) |
Jun
(131) |
Jul
(61) |
Aug
(176) |
Sep
(127) |
Oct
(28) |
Nov
(83) |
Dec
(94) |
2010 |
Jan
(100) |
Feb
(187) |
Mar
(320) |
Apr
(161) |
May
(194) |
Jun
(142) |
Jul
(129) |
Aug
(139) |
Sep
(239) |
Oct
(202) |
Nov
(139) |
Dec
(196) |
2011 |
Jan
(195) |
Feb
(191) |
Mar
(201) |
Apr
(127) |
May
(84) |
Jun
(126) |
Jul
(101) |
Aug
(237) |
Sep
(123) |
Oct
(104) |
Nov
(197) |
Dec
(114) |
2012 |
Jan
(65) |
Feb
(85) |
Mar
(129) |
Apr
(84) |
May
(94) |
Jun
(83) |
Jul
(89) |
Aug
(85) |
Sep
(89) |
Oct
(73) |
Nov
(34) |
Dec
(38) |
2013 |
Jan
(89) |
Feb
(30) |
Mar
(25) |
Apr
(18) |
May
(20) |
Jun
(45) |
Jul
(74) |
Aug
(37) |
Sep
(72) |
Oct
(30) |
Nov
(67) |
Dec
(24) |
2014 |
Jan
(23) |
Feb
(16) |
Mar
(40) |
Apr
(37) |
May
(12) |
Jun
(18) |
Jul
(30) |
Aug
(26) |
Sep
(24) |
Oct
(32) |
Nov
(15) |
Dec
(33) |
2015 |
Jan
(15) |
Feb
(45) |
Mar
(21) |
Apr
(24) |
May
(22) |
Jun
(7) |
Jul
(57) |
Aug
(17) |
Sep
(16) |
Oct
(3) |
Nov
(8) |
Dec
(13) |
2016 |
Jan
(7) |
Feb
(14) |
Mar
(40) |
Apr
(8) |
May
(10) |
Jun
(6) |
Jul
(8) |
Aug
(10) |
Sep
(19) |
Oct
(20) |
Nov
(45) |
Dec
(10) |
2017 |
Jan
(10) |
Feb
(12) |
Mar
(3) |
Apr
(17) |
May
(41) |
Jun
(21) |
Jul
(13) |
Aug
(13) |
Sep
(7) |
Oct
(23) |
Nov
(10) |
Dec
(23) |
2018 |
Jan
(45) |
Feb
(3) |
Mar
(57) |
Apr
(107) |
May
(173) |
Jun
(47) |
Jul
(28) |
Aug
(26) |
Sep
(38) |
Oct
(56) |
Nov
(22) |
Dec
(11) |
2019 |
Jan
(37) |
Feb
(8) |
Mar
(7) |
Apr
(29) |
May
(32) |
Jun
(5) |
Jul
(21) |
Aug
(31) |
Sep
(38) |
Oct
(8) |
Nov
(13) |
Dec
(10) |
2020 |
Jan
(9) |
Feb
(33) |
Mar
(14) |
Apr
(4) |
May
(16) |
Jun
(11) |
Jul
(14) |
Aug
(50) |
Sep
(24) |
Oct
(3) |
Nov
(14) |
Dec
(13) |
2021 |
Jan
(18) |
Feb
(15) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(8) |
Jul
(6) |
Aug
(7) |
Sep
(26) |
Oct
(17) |
Nov
(6) |
Dec
(2) |
2022 |
Jan
(3) |
Feb
(11) |
Mar
(7) |
Apr
(15) |
May
(5) |
Jun
(4) |
Jul
(29) |
Aug
(6) |
Sep
(7) |
Oct
|
Nov
(4) |
Dec
(1) |
2023 |
Jan
|
Feb
|
Mar
|
Apr
(10) |
May
(3) |
Jun
(5) |
Jul
(3) |
Aug
(10) |
Sep
(10) |
Oct
(7) |
Nov
(2) |
Dec
(4) |
2024 |
Jan
(22) |
Feb
(5) |
Mar
(11) |
Apr
(20) |
May
(16) |
Jun
(9) |
Jul
(14) |
Aug
(5) |
Sep
(7) |
Oct
(4) |
Nov
(3) |
Dec
|
2025 |
Jan
(6) |
Feb
(6) |
Mar
(14) |
Apr
(2) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Larry H. <lh...@gm...> - 2020-09-15 13:46:11
|
There TLS/DTLS support in net-snmp. http://net-snmp.sourceforge.net/wiki/index.php/Using_DTLS On Fri, Sep 11, 2020 at 11:11 PM Pavan Kumar <tha...@gm...> wrote: > Hi > > For the scripted environments, the authPriv option in v3 requires the > passphrases to be given along with other options of the snmp commands > (snmpget, snmpwalk etc). So whoever gains access to scripts, they are > able to intercept the credentials. To prevent incidents like this, > along with existing options, can we have some public/private key based > or ssl/tls certificates based encryption added as well? because > private keys will always have 400 perms, it is much safer than passing > passphrases along with other options. > > Thanks > Pavan > > > _______________________________________________ > Net-snmp-coders mailing list > Net...@li... > https://lists.sourceforge.net/lists/listinfo/net-snmp-coders > |
From: Drovalev R.N. <dro...@al...> - 2020-09-15 07:00:25
|
Hello! There is a need to return the value of the ip address when requesting a specific OID. It is necessary to emulate the snmp device. Implemented via perl, which I am new to. Perl extension NetSNMP::ASN does not return values in the request, where Exportable constants - ASN_IPADDRESS, but return values other any types is very good! Why? 1. If in the file - my $string_ASN = ASN_OCTET_STR; # snmpget -c public -v 1 192.168.3.102 1.3.6.1.4.1.318.2.1.2.1.2.1 Iso.1.3.6.1.4.1.318.2.1.2.1.2.1 = STRING: "192.168.3.7" 2. If in the file - my $string_ASN = ASN_IPADDRESS; #snmpget -c public -v 1 192.168.3.102 1.3.6.1.4.1.318.2.1.2.1.2.1 Reason: (noSuchName) There is no such variable name in this MIB. Failed object: iso.1.3.6.1.4.1.318.2.1.2.1.2.1 But #systemctl status snmpd (p.#2) snmpd.service - Simple Network Management Protocol (SNMP) Daemon. Loaded: loaded (/lib/systemd/system/snmpd.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2020-09-11 14:24:24 MSK; 5min ago Process: 30895 ExecStartPre=/bin/mkdir -p /var/run/agentx (code=exited, status=0/SUCCESS) Main PID: 30905 (snmpd) Tasks: 1 (limit: 1075) Memory: 19.6M CGroup: /system.slice/snmpd.service L-30905 /usr/sbin/snmpd -LOw -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf -f -p /run/snmpd.pid Sep 11 14:24:24 snmpd systemd[1]: Starting Simple Network Management Protocol (SNMP) Daemon.... Sep 11 14:24:24 snmpd systemd[1]: Started Simple Network Management Protocol (SNMP) Daemon.. Sep 11 14:24:26 snmpd snmpd[30905]: IP address of 11 bytes passed to setValue with ASN_IPADDRESS Why isn't the ip address returned? How to correctly assign ip address in perl for ASN_IPADDRESS? Where is my mistake? Please tell me. Thanks. --- code --- Enable the file in snmpd.conf: perl do "/usr/share/snmp/2.1.2.1.pl"; Example my 2.1.2.1.pl.pl file : #!/usr/bin/perl use NetSNMP::agent (':all'); use NetSNMP::ASN qw(ASN_IPADDRESS ASN_OCTET_STR); sub hello_handler { my ($handler, $registration_info, $request_info, $requests) = @_; my $request; my $string_value = "192.168.3.7"; my $string_ASN = ASN_OCTET_STR; #my $string_ASN = ASN_IPADDRESS; for($request = $requests; $request; $request = $request->next()) { my $oid = $request->getOID(); if ($request_info->getMode() == MODE_GET) { if ($oid == new NetSNMP::OID(".1.3.6.1.4.1.318.2.1.2.1.2.1")) { $request->setValue($string_ASN, ($string_value)); } elsif ($oid == new NetSNMP::OID(".1.3.6.1.4.1.318.2.1.2.1.2.1")) { $request->setValue($string_ASN, ($string_value)); } } elsif ($request_info->getMode() == MODE_GETNEXT) { if ($oid == new NetSNMP::OID(".1.3.6.1.4.1.318.2.1.2.1.2.1")) { $request->setOID(".1.3.6.1.4.1.318.2.1.2.1.2.2"); $request->setValue($string_ASN, ($string_value)); } elsif ($oid < new NetSNMP::OID(".1.3.6.1.4.1.318.2.1.2.1.2.1")) { $request->setOID(".1.3.6.1.4.1.318.2.1.2.1.2.1"); $request->setValue($string_ASN, ($string_value)); } } } } my $agent = new NetSNMP::agent(); $agent->register(".1.3.6.1.4.1.318.2.1.2.1.2.1", ".1.3.6.1.4.1.318.2.1.2.1.2.1", \&hello_handler); P.S. My task is to return the address of the computer that makes the request for this OID. But at least just returned an arbitrary address! |
From: Philippe G. <phi...@6w...> - 2020-09-11 22:04:24
|
Hi Net snmp coders, I have following issue: I have an external application (frrouting software) that fills in MIB for different network namespaces. I look for a way to send MIB information ( and traps) to different snmp daemons. The idea behind that is to benefit from a community self to each namespace. I investigated the code. Among trials I did, I tried to call twice init_snmp() with two different config parameters - two files -, without success. I think you can confirm me it is not possible to 1 agent: N masters relationships ? So I was wondering if current external API of net-snmp was open enough, so that an agent client code could be done with its own list of file descriptors, etc... The only external dependency would be the agentx protocol itself... Would that be possible ? Thanks for any replies, Regards, Philippe |
From: Magnus F. <ma...@ly...> - 2020-09-07 06:44:46
|
On Sun, Sep 06, 2020 at 07:34:57PM -0700, Bart Van Assche wrote: > On 2020-08-18 10:28, Magnus Fromreide wrote: > > I think the child code in the vfork case should be exactly > > > > execv(argv[0], argv); > > _exit(1); > > > > as that seems to be about what POSIX allows. > > > > (From POSIX.1) The vfork() function has the same effect as fork(2), > > except that the behavior is undefined if the process created by vfork() > > either > > modifies any data other than a variable of type pid_t used to > > store the return value from vfork(), or > > > > returns from the function in which vfork() was called, or > > > > calls any other function before successfully calling _exit(2) or > > one of the exec(3) family of functions. > > > > Yes, vfork is quite limited. > > Feel free to take a look at commit 8fabe044e316f9ecda53148d9afeaf5e5854bb1a. This looks nice, thanks. /MF |
From: Bart V. A. <bva...@ac...> - 2020-09-07 02:35:14
|
On 2020-08-18 10:28, Magnus Fromreide wrote: > I think the child code in the vfork case should be exactly > > execv(argv[0], argv); > _exit(1); > > as that seems to be about what POSIX allows. > > (From POSIX.1) The vfork() function has the same effect as fork(2), > except that the behavior is undefined if the process created by vfork() > either > modifies any data other than a variable of type pid_t used to > store the return value from vfork(), or > > returns from the function in which vfork() was called, or > > calls any other function before successfully calling _exit(2) or > one of the exec(3) family of functions. > > Yes, vfork is quite limited. Feel free to take a look at commit 8fabe044e316f9ecda53148d9afeaf5e5854bb1a. Thanks, Bart. |
From: Pavan K. <tha...@gm...> - 2020-09-02 11:14:15
|
Hi For the scripted environments, the authPriv option in v3 requires the passphrases to be given along with other options of the snmp commands (snmpget, snmpwalk etc). So whoever gains access to scripts, they are able to intercept the credentials. To prevent incidents like this, along with existing options, can we have some public/private key based or ssl/tls certificates based encryption added as well? because private keys will always have 400 perms, it is much safer than passing passphrases along with other options. Thanks Pavan |
From: Simon C. <sim...@mp...> - 2020-08-31 15:51:35
|
The incompatibility started when I upgraded OpenSSL. Since I am compiling NET-SNMP within yocto, I cannot do 'make install'. On Mon, Aug 31, 2020 at 11:18 AM Wes Hardaker < har...@us...> wrote: > Simon Chamlian <sim...@mp...> writes: > > > There seems to be a compatibility issue between net-snmp and the crypto > > library. > > Was that a self-built Net-SNMP 5.8? And it was built recently after the > system upgraded to the newer libcrypto? > > And did you try a 'make install' to see if the installation works or is > that running in the agent directory itself with the libtool wrapper script? > -- > Wes Hardaker > Please mail all replies to net...@li... > |
From: Wes H. <har...@us...> - 2020-08-31 15:18:28
|
Simon Chamlian <sim...@mp...> writes: > There seems to be a compatibility issue between net-snmp and the crypto > library. Was that a self-built Net-SNMP 5.8? And it was built recently after the system upgraded to the newer libcrypto? And did you try a 'make install' to see if the installation works or is that running in the agent directory itself with the libtool wrapper script? -- Wes Hardaker Please mail all replies to net...@li... |
From: Ian C <mc...@ya...> - 2020-08-31 14:17:22
|
My crash issue stems from iinfo->free_data_context cb being called repeatedly with the same address to free. Any thoughts? thanksIan ----- Forwarded Message ----- From: Ian C via Net-snmp-coders <net...@li...>To: net...@li... <net...@li...>Sent: Tuesday, August 25, 2020, 3:20:07 p.m. EDTSubject: Table Iterator Crashes in free_data_context I'm still having a crash issue with my table agent, I can't figure out a solution, hoping the list members could help. In a nutshell I want to read a QNX pps object (file) each time (no caching) it is queried (snmpwalk). The data gets read and returned but a crash happens on the free (datactx). I would really appreciate a hand. thanks,Ian Net-Snmp 5.9QNX 7.1 /* * Note: this file originally auto-generated by mib2c using * : mib2c.iterate.conf 19302 2010-08-13 12:19:42Z dts12 $ */ /* generated from net-snmp-config */ extern "C" { #include <net-snmp/net-snmp-config.h> #include <net-snmp/net-snmp-includes.h> #include <net-snmp/agent/net-snmp-agent-includes.h> #include "chAsinHwSbcNtpTable.h" #include <syslog.h> #include <string.h> } void populateLocalSNMPstruct( struct chAsinHwSbcNtpTable_entry **table, const char channel ); /** Initializes the chAsinHwSbcNtpTable module */ extern "C" void init_chAsinHwSbcNtpTable(void) { /* here we initialize all the tables we're planning on supporting */ //syslog( LOG_DEBUG, "init_chAsinHwSbcNtpTable()"); initialize_table_chAsinHwSbcNtpTable(); } // # Determine the first/last column names void nsModuleTable_loop_free(void *context, netsnmp_iterator_info *dont_care) { free(context); } void freeTableEntry( void *data_context, netsnmp_iterator_info *useless ) { if (data_context != NULL) { free(data_context); <<<<<<<==== CRASHES HERE ON 1st CALL } return; } /** Initialize the chAsinHwSbcNtpTable table by defining its contents and how it's structured */ void initialize_table_chAsinHwSbcNtpTable(void) { //syslog( LOG_ERR, "initialize_table_chAsinHwSbcNtpTable()"); const oid chAsinHwSbcNtpTable_oid[] = {1,3,6,1,4,1,12345,3,3,1,9,6,6}; // 12345 is fictitious const size_t chAsinHwSbcNtpTable_oid_len = OID_LENGTH(chAsinHwSbcNtpTable_oid); netsnmp_handler_registration *reg; netsnmp_iterator_info *iinfo; netsnmp_table_registration_info *table_info; DEBUGMSGTL(("chAsinHwSbcNtpTable:init", "initializing table chAsinHwSbcNtpTable\n")); reg = netsnmp_create_handler_registration( "chAsinHwSbcNtpTable", chAsinHwSbcNtpTable_handler, chAsinHwSbcNtpTable_oid, chAsinHwSbcNtpTable_oid_len, HANDLER_CAN_RONLY ); table_info = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info ); netsnmp_table_helper_add_indexes(table_info, ASN_OCTET_STR, /* index: chAsinHwSbcNtpSbcName */ 0); table_info->min_column = COLUMN_CHASINHWSBCNTPSBCNAME; table_info->max_column = COLUMN_CHASINHWSBCNTPSTATUSSTRING; iinfo = SNMP_MALLOC_TYPEDEF( netsnmp_iterator_info ); iinfo->get_first_data_point = chAsinHwSbcNtpTable_get_first_data_point; iinfo->get_next_data_point = chAsinHwSbcNtpTable_get_next_data_point; iinfo->table_reginfo = table_info; iinfo->free_loop_context_at_end = nsModuleTable_loop_free; iinfo->free_data_context = freeTableEntry; // <<<<<<==== MEM LEAK WITHOUT THIS! netsnmp_register_table_iterator( reg, iinfo ); /* Initialise the contents of the table here */ } struct chAsinHwSbcNtpTable_entry *chAsinHwSbcNtpTable_head; /* create a new row in the (unsorted) table */ struct chAsinHwSbcNtpTable_entry * chAsinHwSbcNtpTable_createEntry( char* chAsinHwSbcNtpSbcName, size_t chAsinHwSbcNtpSbcName_len ) { struct chAsinHwSbcNtpTable_entry *entry; entry = SNMP_MALLOC_TYPEDEF(struct chAsinHwSbcNtpTable_entry); if (!entry) return NULL; memcpy(entry->chAsinHwSbcNtpSbcName, chAsinHwSbcNtpSbcName, chAsinHwSbcNtpSbcName_len); entry->chAsinHwSbcNtpSbcName_len = chAsinHwSbcNtpSbcName_len; entry->next = chAsinHwSbcNtpTable_head; chAsinHwSbcNtpTable_head = entry; return entry; } /* remove a row from the table */ void chAsinHwSbcNtpTable_removeEntry( struct chAsinHwSbcNtpTable_entry *entry ) { struct chAsinHwSbcNtpTable_entry *ptr, *prev; if (!entry) return; /* Nothing to remove */ for ( ptr = chAsinHwSbcNtpTable_head, prev = NULL; ptr != NULL; prev = ptr, ptr = ptr->next ) { if ( ptr == entry ) break; } if ( !ptr ) return; /* Can't find it */ if ( prev == NULL ) chAsinHwSbcNtpTable_head = ptr->next; else prev->next = ptr->next; SNMP_FREE( entry ); /* XXX - release any other internal resources */ } /* Example iterator hook routines - using 'get_next' to do most of the work */ netsnmp_variable_list * chAsinHwSbcNtpTable_get_first_data_point(void **my_loop_context, void **my_data_context, netsnmp_variable_list *put_index_data, netsnmp_iterator_info *mydata) { populateLocalSNMPstruct( &chAsinHwSbcNtpTable_head, 'A' ); // collect NTP data for channel 'A' *my_loop_context = chAsinHwSbcNtpTable_head; return chAsinHwSbcNtpTable_get_next_data_point(my_loop_context, my_data_context, put_index_data, mydata ); } netsnmp_variable_list * chAsinHwSbcNtpTable_get_next_data_point(void **my_loop_context, void **my_data_context, netsnmp_variable_list *put_index_data, netsnmp_iterator_info *mydata) { struct chAsinHwSbcNtpTable_entry *entry = (struct chAsinHwSbcNtpTable_entry *)*my_loop_context; netsnmp_variable_list *idx = put_index_data; if ( entry ) { snmp_set_var_value( idx, entry->chAsinHwSbcNtpSbcName, sizeof(entry->chAsinHwSbcNtpSbcName) ); idx = idx->next_variable; *my_data_context = (void *)entry; *my_loop_context = (void *)entry->next; return put_index_data; } else { return NULL; } } /** handles requests for the chAsinHwSbcNtpTable table */ int chAsinHwSbcNtpTable_handler( netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { netsnmp_request_info *request; netsnmp_table_request_info *table_info; struct chAsinHwSbcNtpTable_entry *table_entry; DEBUGMSGTL(("chAsinHwSbcNtpTable:handler", "Processing request (%d)\n", reqinfo->mode)); switch (reqinfo->mode) { /* * Read-support (also covers GetNext requests) */ case MODE_GET: for (request=requests; request; request=request->next) { table_entry = (struct chAsinHwSbcNtpTable_entry *) netsnmp_extract_iterator_context(request); table_info = netsnmp_extract_table_info( request); switch (table_info->colnum) { case COLUMN_CHASINHWSBCNTPSBCNAME: if ( !table_entry ) { netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE); continue; } snmp_set_var_typed_value( request->requestvb, ASN_OCTET_STR, table_entry->chAsinHwSbcNtpSbcName, table_entry->chAsinHwSbcNtpSbcName_len); break; case COLUMN_CHASINHWSBCNTPSTATUSSTRING: if ( !table_entry ) { netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE); continue; } snmp_set_var_typed_value( request->requestvb, ASN_OCTET_STR, table_entry->chAsinHwSbcNtpStatusString, table_entry->chAsinHwSbcNtpStatusString_len); break; default: netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT); break; } } break; } return SNMP_ERR_NOERROR; } // ==================================================================================================== // Populate the given Net-Snmp-generated struct with PPS data, in this case we want all /pps/ntp // data from all SBCs of the given channel. // void populateLocalSNMPstruct( struct chAsinHwSbcNtpTable_entry **table, const char channel ) { std::list< fpair_type > allSbcNtps; // full path, sbc name // For testing/dev only one file to read... allSbcNtps.push_back( std::make_pair( "/pps/ntp", "A1" )); // pps is QNX-specific, think of it as a file // process the list of paths extracting the json formatted ntp data struct chAsinHwSbcNtpTable_entry * tail, * head; head = NULL; tail = NULL; BOOST_FOREACH( const fpair_type & s, allSbcNtps ) { // open, read and close pps object char ppsData[2000]; readFile( s.first.c_str(), ppsData, sizeof( ppsData )); // readFile reads entire pps/file in one shot (impl not included here) std::string json( ppsData ); // get rid of all lines before json line (which starts with "sources:" size_t pos; if( std::string::npos != ( pos = json.find("sources:"))) { json.erase( 0, pos ); } // get rid of all lines after the json line (which ends with "}]}" if( std::string::npos != ( pos = json.find("}]}"))) { json.erase( pos + strlen("}]}") ); } // at this point ppsData is of the form "sources:json:{"data":[{...}]} // the 'sources:json:' isn't actually part of our json data, it's the way QNX PPS objects identify json data, so strip it away json.erase( 0, strlen("sources:json:")); struct chAsinHwSbcNtpTable_entry * current; current = reinterpret_cast< chAsinHwSbcNtpTable_entry *>( SNMP_MALLOC_TYPEDEF( struct chAsinHwSbcNtpTable_entry )); strncpy( current->chAsinHwSbcNtpStatusString, json.c_str(), JSONSIZE ); current->chAsinHwSbcNtpStatusString_len = json.size(); strncpy( current->chAsinHwSbcNtpSbcName, s.second.c_str(), NAMESIZE ); current->chAsinHwSbcNtpSbcName_len = s.second.size(); current->next = NULL; if( head == NULL ) { head = current; } else { tail->next = current; } tail = current; } *table = head; } _______________________________________________ Net-snmp-coders mailing list Net...@li... https://lists.sourceforge.net/lists/listinfo/net-snmp-coders |
From: Simon C. <sim...@mp...> - 2020-08-31 14:12:11
|
Hi, There seems to be a compatibility issue between net-snmp and the crypto library. The libcrypto has been updated to 1.1, but snmp still calls for 1.0.2 instead of using the link. ~# snmpd -v snmpd: error while loading shared libraries: libcrypto.so.1.0.2: cannot open shared object file: No such file or directory # ls -l /usr/lib/libcrypto* lrwxrwxrwx 1 root root 16 Jun 30 21:18 /usr/lib/libcrypto.so -> libcrypto.so.1.1 -rwxr-xr-x 1 root root 2034008 Jul 6 13:01 /usr/lib/libcrypto.so.1.1 |
From: Ian C <mc...@ya...> - 2020-08-26 15:37:50
|
I've added some cout's for debug (// free() commented out in favor of a cout). If _get_next_ has a non-NULL entry it will cout entry's two strings ('A1' is the idx) Here's the output (thanks for the help): NET-SNMP version 5.9.rc2 AgentX subagent connected _get_first_() populate() populate just malloc'ed 908f360 _get_next_() A1 {"data":[{"hostname":"B1","remote":"10.128.102.11","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"81.570","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.102.12","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"80.283","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.103.11","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"81.192","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.103.12","refid":".GPS.","st":"1","t":"u","when":"21d","poll":"64","reach":"0","delay":"0.977","offset":"0.077","jitter":"0.000","updated":"2020-Aug-20 16:45:47"}]} _get_next_() entry is NULL freeTableEntry() free'ing 908f360 freeTableEntry() free'ing 908f360 _get_first_() populate() populate just malloc'ed 908ea80 _get_next_() A1 {"data":[{"hostname":"B1","remote":"10.128.102.11","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"81.570","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.102.12","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"80.283","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.103.11","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"81.192","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.103.12","refid":".GPS.","st":"1","t":"u","when":"21d","poll":"64","reach":"0","delay":"0.977","offset":"0.077","jitter":"0.000","updated":"2020-Aug-20 16:45:47"}]} freeTableEntry() free'ing 908ea80 freeTableEntry() free'ing 908ea80 _get_next_() entry is NULL _get_first_() populate() populate just malloc'ed 908e630 _get_next_() A1 {"data":[{"hostname":"B1","remote":"10.128.102.11","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"81.570","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.102.12","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"80.283","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.103.11","refid":".GPS.","st":"1","t":"u","when":"7d","poll":"64","reach":"0","delay":"0.977","offset":"81.192","jitter":"0.000","updated":"2020-Aug-20 16:45:47"},{"hostname":"B1","remote":"10.128.103.12","refid":".GPS.","st":"1","t":"u","when":"21d","poll":"64","reach":"0","delay":"0.977","offset":"0.077","jitter":"0.000","updated":"2020-Aug-20 16:45:47"}]} _get_next_() entry is NULL freeTableEntry() free'ing 908e630 ----- Forwarded Message ----- From: Wes Hardaker <har...@us...>To: Ian C via Net-snmp-coders <net...@li...>Cc: Ian C <mc...@ya...>Sent: Wednesday, August 26, 2020, 10:13:09 a.m. EDTSubject: Re: Table Iterator Crashes in free_data_context Ian C via Net-snmp-coders <net...@li...> writes: > I'm still having a crash issue with my table agent, I can't figure out a > solution, hoping the list members could help. In a nutshell I want to read a > QNX pps object (file) each time (no caching) it is queried (snmpwalk). The data > gets read and returned but a crash happens on the free (datactx). I assume if you comment out that free it will gain in memory usage? -- Wes Hardaker Please mail all replies to net...@li... |
From: Ian C <mc...@ya...> - 2020-08-26 14:44:28
|
Yes that's correct, memory leak flagged by valgrind. ----- Forwarded Message ----- From: Wes Hardaker <har...@us...>To: Ian C via Net-snmp-coders <net...@li...>Cc: Ian C <mc...@ya...>Sent: Wednesday, August 26, 2020, 10:13:09 a.m. EDTSubject: Re: Table Iterator Crashes in free_data_context Ian C via Net-snmp-coders <net...@li...> writes: > I'm still having a crash issue with my table agent, I can't figure out a > solution, hoping the list members could help. In a nutshell I want to read a > QNX pps object (file) each time (no caching) it is queried (snmpwalk). The data > gets read and returned but a crash happens on the free (datactx). I assume if you comment out that free it will gain in memory usage? -- Wes Hardaker Please mail all replies to net...@li... |
From: Wes H. <har...@us...> - 2020-08-26 14:13:15
|
Ian C via Net-snmp-coders <net...@li...> writes: > I'm still having a crash issue with my table agent, I can't figure out a > solution, hoping the list members could help. In a nutshell I want to read a > QNX pps object (file) each time (no caching) it is queried (snmpwalk). The data > gets read and returned but a crash happens on the free (datactx). I assume if you comment out that free it will gain in memory usage? -- Wes Hardaker Please mail all replies to net...@li... |
From: Ian C <mc...@ya...> - 2020-08-25 19:19:08
|
I'm still having a crash issue with my table agent, I can't figure out a solution, hoping the list members could help. In a nutshell I want to read a QNX pps object (file) each time (no caching) it is queried (snmpwalk). The data gets read and returned but a crash happens on the free (datactx). I would really appreciate a hand. thanks,Ian Net-Snmp 5.9QNX 7.1 /* * Note: this file originally auto-generated by mib2c using * : mib2c.iterate.conf 19302 2010-08-13 12:19:42Z dts12 $ */ /* generated from net-snmp-config */ extern "C" { #include <net-snmp/net-snmp-config.h> #include <net-snmp/net-snmp-includes.h> #include <net-snmp/agent/net-snmp-agent-includes.h> #include "chAsinHwSbcNtpTable.h" #include <syslog.h> #include <string.h> } void populateLocalSNMPstruct( struct chAsinHwSbcNtpTable_entry **table, const char channel ); /** Initializes the chAsinHwSbcNtpTable module */ extern "C" void init_chAsinHwSbcNtpTable(void) { /* here we initialize all the tables we're planning on supporting */ //syslog( LOG_DEBUG, "init_chAsinHwSbcNtpTable()"); initialize_table_chAsinHwSbcNtpTable(); } // # Determine the first/last column names void nsModuleTable_loop_free(void *context, netsnmp_iterator_info *dont_care) { free(context); } void freeTableEntry( void *data_context, netsnmp_iterator_info *useless ) { if (data_context != NULL) { free(data_context); <<<<<<<==== CRASHES HERE ON 1st CALL } return; } /** Initialize the chAsinHwSbcNtpTable table by defining its contents and how it's structured */ void initialize_table_chAsinHwSbcNtpTable(void) { //syslog( LOG_ERR, "initialize_table_chAsinHwSbcNtpTable()"); const oid chAsinHwSbcNtpTable_oid[] = {1,3,6,1,4,1,12345,3,3,1,9,6,6}; // 12345 is fictitious const size_t chAsinHwSbcNtpTable_oid_len = OID_LENGTH(chAsinHwSbcNtpTable_oid); netsnmp_handler_registration *reg; netsnmp_iterator_info *iinfo; netsnmp_table_registration_info *table_info; DEBUGMSGTL(("chAsinHwSbcNtpTable:init", "initializing table chAsinHwSbcNtpTable\n")); reg = netsnmp_create_handler_registration( "chAsinHwSbcNtpTable", chAsinHwSbcNtpTable_handler, chAsinHwSbcNtpTable_oid, chAsinHwSbcNtpTable_oid_len, HANDLER_CAN_RONLY ); table_info = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info ); netsnmp_table_helper_add_indexes(table_info, ASN_OCTET_STR, /* index: chAsinHwSbcNtpSbcName */ 0); table_info->min_column = COLUMN_CHASINHWSBCNTPSBCNAME; table_info->max_column = COLUMN_CHASINHWSBCNTPSTATUSSTRING; iinfo = SNMP_MALLOC_TYPEDEF( netsnmp_iterator_info ); iinfo->get_first_data_point = chAsinHwSbcNtpTable_get_first_data_point; iinfo->get_next_data_point = chAsinHwSbcNtpTable_get_next_data_point; iinfo->table_reginfo = table_info; iinfo->free_loop_context_at_end = nsModuleTable_loop_free; iinfo->free_data_context = freeTableEntry; // <<<<<<==== MEM LEAK WITHOUT THIS! netsnmp_register_table_iterator( reg, iinfo ); /* Initialise the contents of the table here */ } struct chAsinHwSbcNtpTable_entry *chAsinHwSbcNtpTable_head; /* create a new row in the (unsorted) table */ struct chAsinHwSbcNtpTable_entry * chAsinHwSbcNtpTable_createEntry( char* chAsinHwSbcNtpSbcName, size_t chAsinHwSbcNtpSbcName_len ) { struct chAsinHwSbcNtpTable_entry *entry; entry = SNMP_MALLOC_TYPEDEF(struct chAsinHwSbcNtpTable_entry); if (!entry) return NULL; memcpy(entry->chAsinHwSbcNtpSbcName, chAsinHwSbcNtpSbcName, chAsinHwSbcNtpSbcName_len); entry->chAsinHwSbcNtpSbcName_len = chAsinHwSbcNtpSbcName_len; entry->next = chAsinHwSbcNtpTable_head; chAsinHwSbcNtpTable_head = entry; return entry; } /* remove a row from the table */ void chAsinHwSbcNtpTable_removeEntry( struct chAsinHwSbcNtpTable_entry *entry ) { struct chAsinHwSbcNtpTable_entry *ptr, *prev; if (!entry) return; /* Nothing to remove */ for ( ptr = chAsinHwSbcNtpTable_head, prev = NULL; ptr != NULL; prev = ptr, ptr = ptr->next ) { if ( ptr == entry ) break; } if ( !ptr ) return; /* Can't find it */ if ( prev == NULL ) chAsinHwSbcNtpTable_head = ptr->next; else prev->next = ptr->next; SNMP_FREE( entry ); /* XXX - release any other internal resources */ } /* Example iterator hook routines - using 'get_next' to do most of the work */ netsnmp_variable_list * chAsinHwSbcNtpTable_get_first_data_point(void **my_loop_context, void **my_data_context, netsnmp_variable_list *put_index_data, netsnmp_iterator_info *mydata) { populateLocalSNMPstruct( &chAsinHwSbcNtpTable_head, 'A' ); // collect NTP data for channel 'A' *my_loop_context = chAsinHwSbcNtpTable_head; return chAsinHwSbcNtpTable_get_next_data_point(my_loop_context, my_data_context, put_index_data, mydata ); } netsnmp_variable_list * chAsinHwSbcNtpTable_get_next_data_point(void **my_loop_context, void **my_data_context, netsnmp_variable_list *put_index_data, netsnmp_iterator_info *mydata) { struct chAsinHwSbcNtpTable_entry *entry = (struct chAsinHwSbcNtpTable_entry *)*my_loop_context; netsnmp_variable_list *idx = put_index_data; if ( entry ) { snmp_set_var_value( idx, entry->chAsinHwSbcNtpSbcName, sizeof(entry->chAsinHwSbcNtpSbcName) ); idx = idx->next_variable; *my_data_context = (void *)entry; *my_loop_context = (void *)entry->next; return put_index_data; } else { return NULL; } } /** handles requests for the chAsinHwSbcNtpTable table */ int chAsinHwSbcNtpTable_handler( netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { netsnmp_request_info *request; netsnmp_table_request_info *table_info; struct chAsinHwSbcNtpTable_entry *table_entry; DEBUGMSGTL(("chAsinHwSbcNtpTable:handler", "Processing request (%d)\n", reqinfo->mode)); switch (reqinfo->mode) { /* * Read-support (also covers GetNext requests) */ case MODE_GET: for (request=requests; request; request=request->next) { table_entry = (struct chAsinHwSbcNtpTable_entry *) netsnmp_extract_iterator_context(request); table_info = netsnmp_extract_table_info( request); switch (table_info->colnum) { case COLUMN_CHASINHWSBCNTPSBCNAME: if ( !table_entry ) { netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE); continue; } snmp_set_var_typed_value( request->requestvb, ASN_OCTET_STR, table_entry->chAsinHwSbcNtpSbcName, table_entry->chAsinHwSbcNtpSbcName_len); break; case COLUMN_CHASINHWSBCNTPSTATUSSTRING: if ( !table_entry ) { netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE); continue; } snmp_set_var_typed_value( request->requestvb, ASN_OCTET_STR, table_entry->chAsinHwSbcNtpStatusString, table_entry->chAsinHwSbcNtpStatusString_len); break; default: netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT); break; } } break; } return SNMP_ERR_NOERROR; } // ==================================================================================================== // Populate the given Net-Snmp-generated struct with PPS data, in this case we want all /pps/ntp // data from all SBCs of the given channel. // void populateLocalSNMPstruct( struct chAsinHwSbcNtpTable_entry **table, const char channel ) { std::list< fpair_type > allSbcNtps; // full path, sbc name // For testing/dev only one file to read... allSbcNtps.push_back( std::make_pair( "/pps/ntp", "A1" )); // pps is QNX-specific, think of it as a file // process the list of paths extracting the json formatted ntp data struct chAsinHwSbcNtpTable_entry * tail, * head; head = NULL; tail = NULL; BOOST_FOREACH( const fpair_type & s, allSbcNtps ) { // open, read and close pps object char ppsData[2000]; readFile( s.first.c_str(), ppsData, sizeof( ppsData )); // readFile reads entire pps/file in one shot (impl not included here) std::string json( ppsData ); // get rid of all lines before json line (which starts with "sources:" size_t pos; if( std::string::npos != ( pos = json.find("sources:"))) { json.erase( 0, pos ); } // get rid of all lines after the json line (which ends with "}]}" if( std::string::npos != ( pos = json.find("}]}"))) { json.erase( pos + strlen("}]}") ); } // at this point ppsData is of the form "sources:json:{"data":[{...}]} // the 'sources:json:' isn't actually part of our json data, it's the way QNX PPS objects identify json data, so strip it away json.erase( 0, strlen("sources:json:")); struct chAsinHwSbcNtpTable_entry * current; current = reinterpret_cast< chAsinHwSbcNtpTable_entry *>( SNMP_MALLOC_TYPEDEF( struct chAsinHwSbcNtpTable_entry )); strncpy( current->chAsinHwSbcNtpStatusString, json.c_str(), JSONSIZE ); current->chAsinHwSbcNtpStatusString_len = json.size(); strncpy( current->chAsinHwSbcNtpSbcName, s.second.c_str(), NAMESIZE ); current->chAsinHwSbcNtpSbcName_len = s.second.size(); current->next = NULL; if( head == NULL ) { head = current; } else { tail->next = current; } tail = current; } *table = head; } |
From: Ian C <mc...@ya...> - 2020-08-24 22:17:32
|
Turns out that commenting out // iinfo->free_data_context = freeTableEntry; introduces a memory leak. Really at a loss. If anyone has any ideas pls let me know. Ian ----- Forwarded Message ----- From: Ian C via Net-snmp-coders <net...@li...>To: net...@li... <net...@li...>Sent: Friday, August 21, 2020, 2:01:12 p.m. EDTSubject: Two Table Subagents, 1 Crashes; Other's Fine I'm having an issue with a table subagent that crashes with (SIGABRT) when querried. This subagent was working under a previous OS (qnx 6.5) and Net-Snmp 5.6, but now under qnx 7.1 & Net-Snmp 5.9 it crashes. I was comparing it to another table subagent that I have and works fine, they were both generated: auto-generated by mib2c using : mib2c.iterate.conf In comparing the code I noticed that the one that crashes has a slightly different initialization in the initialize_table...(), in that it has entries for: iinfo->free_loop_context_at_end = nsModuleTable_loop_free; iinfo->free_data_context = freeTableEntry; The subagent that works ok has no such entries. If I comment out the // iinfo->free_data_context = freeTableEntry; No crash, and (I may be wrong here) no increase in memory usage (but there may be, only investigated a little). But with the free_data_context = freeTableEntry It crashes with this stack: SignalKill() at SignalKill.S:38 0x1012d078a __malloc_panic_str() at dlist.c:127 0x1012b4552 _list_release() at dlist.c:1,053 0x1012b5cd0 __prelocked_free() at malloc.c:392 0x1012b88dc __free() at malloc.c:425 0x1012b88dc __free() at malloc.c:410 0x1012b88dc freeTableEntry() at chAsinHwSbcNtpTable.cpp:43 0x804db13 <<<<<<<<<<< MY SUBAGENT netsnmp_free_ti_cache() at table_iterator.c:390 0x80533ea netsnmp_free_list_data() at data_list.c:40 0x80d5c92 netsnmp_free_all_list_data() at data_list.c:52 0x80d5c92 void freeTableEntry( void *data_context, netsnmp_iterator_info *useless ) { if (data_context != NULL) { free(data_context); <<<<<<<<<<<<<<<<<<<<<<<<< HERE } return; } Anyone have any thoughts? thanks, Ian _______________________________________________ Net-snmp-coders mailing list Net...@li... https://lists.sourceforge.net/lists/listinfo/net-snmp-coders |
From: Ian C <mc...@ya...> - 2020-08-24 14:45:57
|
As it turns out walk requests for the ifTable fail (nothing output by snmpd -Lo)atTable can be queried okay.sysORTable can be queried okay. I can query my own tables.Maybe off topic but scalar gets for sysUpTime & sysName work okay. > I'm having an issue with a table subagent that crashes with (SIGABRT) when > querried. This subagent was working under a previous OS (qnx 6.5) and Net-Snmp > 5.6, but now under qnx 7.1 & Net-Snmp 5.9 it crashes. So does this only happen with your MIB? It can walk the ifTable and other built in ones ok or not? -- Wes Hardaker Please mail all replies to net...@li... |
From: Wes H. <har...@us...> - 2020-08-21 21:47:26
|
Ian C via Net-snmp-coders <net...@li...> writes: > I'm having an issue with a table subagent that crashes with (SIGABRT) when > querried. This subagent was working under a previous OS (qnx 6.5) and Net-Snmp > 5.6, but now under qnx 7.1 & Net-Snmp 5.9 it crashes. So does this only happen with your MIB? It can walk the ifTable and other built in ones ok or not? -- Wes Hardaker Please mail all replies to net...@li... |
From: Wes H. <har...@us...> - 2020-08-21 21:46:29
|
Craig Small <csmall@dropbear.xyz> writes: > Even though the signature checks out, the archive seems to be > corrupted. Odd. Turns out that "star", which is the verison of tar we decided decades ago was the only one that produced tar archives that worked on every platform we could find, messes up when overwriting an existing file. IE, you have to remove the existing one before re-running. Anyway, I've done that, re-created the archive and re-uploaded. Thanks for pointing it it out. -- Wes Hardaker Please mail all replies to net...@li... |
From: Ian C <mc...@ya...> - 2020-08-21 18:00:12
|
I'm having an issue with a table subagent that crashes with (SIGABRT) when querried. This subagent was working under a previous OS (qnx 6.5) and Net-Snmp 5.6, but now under qnx 7.1 & Net-Snmp 5.9 it crashes. I was comparing it to another table subagent that I have and works fine, they were both generated: auto-generated by mib2c using : mib2c.iterate.conf In comparing the code I noticed that the one that crashes has a slightly different initialization in the initialize_table...(), in that it has entries for: iinfo->free_loop_context_at_end = nsModuleTable_loop_free; iinfo->free_data_context = freeTableEntry; The subagent that works ok has no such entries. If I comment out the // iinfo->free_data_context = freeTableEntry; No crash, and (I may be wrong here) no increase in memory usage (but there may be, only investigated a little). But with the free_data_context = freeTableEntry It crashes with this stack: SignalKill() at SignalKill.S:38 0x1012d078a __malloc_panic_str() at dlist.c:127 0x1012b4552 _list_release() at dlist.c:1,053 0x1012b5cd0 __prelocked_free() at malloc.c:392 0x1012b88dc __free() at malloc.c:425 0x1012b88dc __free() at malloc.c:410 0x1012b88dc freeTableEntry() at chAsinHwSbcNtpTable.cpp:43 0x804db13 <<<<<<<<<<< MY SUBAGENT netsnmp_free_ti_cache() at table_iterator.c:390 0x80533ea netsnmp_free_list_data() at data_list.c:40 0x80d5c92 netsnmp_free_all_list_data() at data_list.c:52 0x80d5c92 void freeTableEntry( void *data_context, netsnmp_iterator_info *useless ) { if (data_context != NULL) { free(data_context); <<<<<<<<<<<<<<<<<<<<<<<<< HERE } return; } Anyone have any thoughts? thanks, Ian |
From: Craig S. <cs...@dr...> - 2020-08-21 11:16:31
|
Hi, Even though the signature checks out, the archive seems to be corrupted. $ tar tfz ~/Downloads/net-snmp-5.9.tar.gz >/dev/null gzip: stdin: decompression OK, trailing garbage ignored tar: Child returned status 2 tar: Error is not recoverable: exiting now - Craig |
From: Craig S. <cs...@dr...> - 2020-08-21 10:45:39
|
On Fri, 21 Aug 2020 at 20:11, Craig Small <csmall@dropbear.xyz> wrote: > gzip: stdin: decompression OK, trailing garbage ignored > tar: Child returned status 2 > tar: Error is not recoverable: exiting now I don't even know how vi does this, but: net-snmp-5.9/ci/perl.bat net-snmp-5.9/ci/build.sh gzip: /home/csmall/Downloads/net-snmp-5.9.tar.gz: decompression OK, trailing garbage ignored net-snmp-5.9/ci/before.sh net-snmp-5.9/aclocal.m4 |
From: Wes H. <har...@us...> - 2020-08-20 17:40:06
|
We're happy to announce the release of version 5.9 of Net-SNMP! The NET-SNMP Development Team Contents of this announcement ----------------------------- - What has Changed recently? - Where can I get it? - Are there binaries available? - What operating systems does it run on? - Which versions of the SNMP protocol are supported in this package? - I've found a bug or have a suggestion, how do I tell you about it? What has Changed recently? ------------------------------------------- The NEWS file snippits from these releases are as follows. See the CHANGES and ChangeLog files for increasing levels of detail. Note: this release (5.9) was made from a branch originally intended to release a 5.8.1 release, but due to some minor API changes we opted to release it as 5.9 instead to meet our published versioning numbering policy. Thus, you might wish to consider it more of a bug-fixing release than a more normal new-feature-based release. The following shows the NEWS file contents for the 5.8 release: *5.9* snmplib: - Add IPv6 support to DTLSUDP transport CHANGES: snmplib: use new netsnmp_sockaddr_storage in netsnmp_addr_pair CHANGES: snmplib: add base_transport ptr for tunneled transports snmpd: - Security vulnerabilty in the ping MIB reported by Christopher Ertl from Microsoft fixed - Changing to a different uid/gid can only be done once - The extend mib is now read-only by default snmptrap: - BUG: 2899: Patch from Drew Roedersheimer to set library engineboots/time values before sending unspecified: - Add pkg-config support for building applications and sub-agents Use the netsnmp package when building Net-SNMP applications. Use the netsnmp-agent package when building Net-SNMP subagents. Where can I get it? ------------------ Download: - http://www.net-snmp.org/download.html Web page: - http://www.net-snmp.org/ Sourceforge Project page: - http://www.net-snmp.org/project/net-snmp/ Are there binaries available? ---------------------------- - Binaries do appear on our download site, but often are published a bit later than the normal source code. Most of the binaries that are available have been linked with the OpenSSL package so you'll need a copy of it installed in order to use them. If you don't have OpenSSL installed and don't want it installed, please get the net-snmp source release instead and built it yourself (but you'll loose support for SNMPv3 with SHA1 authentication and both DES and AES encryption). What operating systems does it run on? ------------------------------------- Both the applications and the agent have been reported as running (at least in part) on the following operating systems for at least one version of Net-SNMP: * Linux (kernels 4.17 to 1.3) * Solaris/SPARC (11 to 2.3), Solaris/Intel (10, 9) -- see README.solaris * HP-UX (11.31 to 9.01) -- see README.hpux11 * Mac OS X (10.5 to 10.1) -- see README.osX * NetBSD (2.0 to 1.0) * FreeBSD (7.0 to 2.2) * OpenBSD (4.0 to 2.6) * BSDi (4.0.1 to 2.1) * AIX (6.1, 5.3, 5.2, 5.1, 4.3.3, 4.1.5, 3.2.5) -- see README.aix * IRIX (6.5 to 5.1) * OSF (4.0, 3.2 and Tru64 Unix 5.1B) -- see README.tru64 * SunOS 4 (4.1.4 to 4.1.2) * Ultrix (4.5 to 4.2) * Dynix/PTX 4.4 * QNX 6.2.1A See our FAQ at http://www.net-snmp.org/wiki/index.php/FAQ for more details on portability of the Net-SNMP package. Which versions of the SNMP protocol are supported in this package? ----------------------------------------------------------------- SNMPv1, SNMPv2c, and SNMPv3, including: * user-based (USM) support * TLS and DTLS-based support * an alpha implementation of kerberos-based and ssh-based support * HMAC-SHA-2 Authentication Protocols (RFC 7860) SHA-224, SHA-256, SHA-384 and SHA-512 * AES-192 and AES-256 privacy protocols from draft-blumenthal-aes-usm-04 I've found a bug or have a suggestion, how do I tell you about it? ----------------------------------------------------------------- Please submit the bug to our bug-tracking system at: http://www.net-snmp.org/bugs/ Please submit patches (for features or bugs) to our patch-tracking system. (You don't need to submit a big report as well, just a patch) http://www.net-snmp.org/patches/ -- Wes Hardaker Please mail all replies to net...@li... |
From: Wes H. <har...@us...> - 2020-08-20 17:39:48
|
Andy Fiddaman <an...@om...> writes: > Just FYI, the archive contains some .o files. > This causes problems when building on a different architecture or 32-bit. Archives fixed; thanks for pointing out the issue. -- Wes Hardaker Please mail all replies to net...@li... |
From: Wes H. <har...@us...> - 2020-08-20 17:33:36
|
Andy Fiddaman <an...@om...> writes: > Just FYI, the archive contains some .o files. > This causes problems when building on a different architecture or 32-bit. Argg.... Thanks. -- Wes Hardaker Please mail all replies to net...@li... |
From: Magnus F. <ma...@ly...> - 2020-08-18 17:28:27
|
On Sun, Aug 16, 2020 at 06:15:17PM -0700, Bart Van Assche wrote: > On 2020-08-16 15:58, Wes Hardaker wrote: > > Magnus Fromreide <ma...@ly...> writes: > > > >> That is a more lenient option than just dropping it so I think 'happy with > >> dropping it' covers this variant. On the other hand I usually am far from > >> the most conservative one in discussions like this one. > > > > I think off by default makes a lot more sense than an out-right removal. > > How about restoring uClinux support with the patch below? parse_cmd() and > dup() are called before fork(). That change makes it possible to use a > regular pipe between the parent and the child, even when using vfork(). The > patch below has been tested on Linux (but not on uClinux). Not like this, see below. > Thanks, > > Bart. > > > + } > + NETSNMP_IGNORE_RESULT(dup2(STDOUT_FILENO, STDERR_FILENO)); > +#ifdef __uClinux__ > + if ((*pid = vfork()) == 0) { > +#else > + if ((*pid = fork()) == 0) { > /* > * close all non-standard open file descriptors > */ > - netsnmp_close_fds(1); > - NETSNMP_IGNORE_RESULT(dup(1)); /* stderr */ > + netsnmp_close_fds(STDOUT_FILENO); > +#endif Here I think pid_t tmppid; #if HAVE_FORK tmppid = fork(); netsnmp_close_fds(STDOUT_FILENO); #elif HAVE_VFORK tmppid = vfork(); #else #error "How to one spawn a process?" #endif is better since it removes the pointer access from the vfork child > > - argv = parse_cmd(&args, cmd); > - if (!argv) { > - DEBUGMSGTL(("util_funcs", "get_exec_pipes(): argv == NULL\n")); > - return 0; > - } > - DEBUGMSGTL(("util_funcs", "get_exec_pipes(): argv[0] = %s\n", argv[0])); > + /* Child process */ > execv(argv[0], argv); > perror(argv[0]); > free(argv); > free(args); These frees are a big no-no in the vfork child. Remember that the parent and the child share all memory pages. > - exit(1); > + return 1; Returning from the calling function is explicitly listed as forbidden in the man page. I think the child code in the vfork case should be exactly execv(argv[0], argv); _exit(1); as that seems to be about what POSIX allows. (From POSIX.1) The vfork() function has the same effect as fork(2), except that the behavior is undefined if the process created by vfork() either modifies any data other than a variable of type pid_t used to store the return value from vfork(), or returns from the function in which vfork() was called, or calls any other function before successfully calling _exit(2) or one of the exec(3) family of functions. Yes, vfork is quite limited. /MF |