Remove -Werror gcc flag fromt Makefile. gcc 4.8.5 if default compiler for vz7. Default compiler for vz7 does not know flag -Wno-delete-incomplete, last one may be use only for gcc 7.5.0+, thus we remove Werror.Signed-off-by: Efim Shevrin <efim.shevrin@virtuozzo.com>
Added memory release functions for netsnmp_mib_handler #PSBM-139802The netsnmp_mib_handler itself consists of a data pointer myvoid
and a function pointer data_free. data_free is used to tell the netsnmp
library to free data. We add a function to burn out the data,
some kind of wrapper for the case when calling the destructor is important.
Signed-off-by: Fima Shevrin <efim.shevrin@virtuozzo.com>
Merge pull request #16 in OVZ/rmond from ~ALEKSANDR.LESKIN/rmond:PSBM-137790 to master* commit 'e8e5ab0b1b2f0473de26dda9ea9bd45704440853':
update target list by adding dist-vz9-alpha #PSBM-137790
fix warnings for BOOST_BIND_GLOBAL_PLACEHOLDERS #PSBM-137790
fix build for vz9: add boost include file #PSBM-137790
Merge pull request #15 in OVZ/rmond from ~IBAZHITOV/rmond:PSBM-130820 to master* commit 'cbdf418d583a549c20fa3be925e82ae9f537b08f':
Initialize plugin directly within the main thread
Initialize plugin directly within the main thread`net-snmp-5.8` introduced additional checks that prevent
`SNMPD_CALLBACK_SEND_TRAP*` callbacks to be executed when there are no
active snmp sessions. Because of that, the plugin becomes effectively
disabled.
The deferred, callback-based, initialization mechanism was introduced in
the pre-systemd era. At the time, `snmpd` was forking itself during
the startup like any other well-behaving unix d...
Merge pull request #14 in OVZ/rmond from ~EFIM SHEVRIN/rmond_:bugfix/PSBM-121353-rmond-fails-to-build-vz8linux to master* commit 'dd540229fe4c71aa0d6508b9a81b56325b3b62eb':
Template key word for template-specific data types was added.std::auto_ptr was changed to std::unique_ptr. Remove snmp_session::remote_port
Merge pull request #13 in OVZ/rmond from ~IBAZHITOV/rmond:PSBM-121364 to master* commit '8d1a35b811449b0291ed250e2c6f96f9e9055730':
Create a Virtuozzo-owned copy of the MIB file
Create a Virtuozzo-owned copy of the MIB fileThe original PARALLELS-RMOND-SMI.txt can no longer be modified.
Leave it as is and copy its contents into VIRTUOZZO-RMOND-SMI.txt
replacing Parallels related identifiers with Virtuozzo ones.
PARALLELS-RMOND-SMI.txt is now read-only and is left for compatibility
with existing SNMP configurations.
New SNMP configurations should use the VIRTUOZZO-RMOND-SMI.txt MIB file.
Related to PSBM-121364
...
Merge pull request #11 in OVZ/rmond from ~SHRIKE/rmond:master to master* commit '7598868f86238d467ef89974b1212cbbd2e3f66d':
fixes a heap corruption (use after free)
fixes a heap corruption (use after free)netsnmp lib backs up a table row data in the request on traversal
of the table. this is ok in case of a sequential execution but
leads to ub if another thread removes the row from the table until
the data is being accessed.
the problem is we use a set to order table items thus it's impossible
to check for existence in the set.
let's have a simple hash for the purpose and make another test insid...
bug #PSBM-92261 aka "net-snmp" crash: "snmpd killed by SIGSEGV"we have a race between a find and a erase. if the erase wins it
may delete the row before the find increments its reference counter.
callee of the find will end with a bogus tuple.
seems it's time to protect storage accesses with a lock to prevent
these races
bug #PSBM-89621 aka "net-snmp" crash: "snmpd killed by SIGSEGV"somebody called exit. it was not snmpd because it doesn't use
value 6 for its exit status code. thus plugins finalization has not
been performed properly. prlsdk was still running while some of
its dependencies have already been destroyed by glibc cleanup
handlers.
exit man suggests to register an atexit handler to perform cleanup
of a shared library which is the case for rmond. as these handle...
bug #PSBM-89210 aka Dispatcher and snmpd huge memory consumptionusers may set a huge number for a ct cpus value. rmond generates
an entry per vcpu in memory. this results in a huge memory consumption
of the process though these entries won't bear much info.
let's limit the number of entries to prevent the memory overconsumption.
bug #PSBM-89210 aka Dispatcher and snmpd huge memory consumptionextra data is stored along the request when a new record is being
inserted. we rely on correct snmp routine but current users don't
follow the rules and don't provide free request in the end. noboby
frees the memory and we have a leak. let's register a callback to
free the memory.
bug #PSBM-89210 aka Dispatcher and snmpd huge memory consumptioninsert can fail if a duplicate entry is inside the container already.
we don't process that case and leak memory.
range scan doesn't work because it uses exact match which we expect
a partial one. use another predicate which meets the requirements.