Age | Commit message (Collapse) | Author | |
---|---|---|---|
2023-12-22 | Call log_setverbosity() directly after getopt() so that debugging | Martijn van Duren | |
information during config-parsing can be displayed. OK tb@ | |||
2023-12-22 | Remove a log_debug from usm_checkuser(). It would only display what is in | Martijn van Duren | |
the config and was never actually displayed because of insufficient verbosity level during config-parsing and would display the wrong auth algorithm for SHA2. OK tb@ | |||
2023-12-21 | mib_init() and MIB() disappeared with mib.c, remove their declarations. | Martijn van Duren | |
MIBDECL() and MIBEND are only used inside mib.h, so move their definition in there. OK tb@ | |||
2023-12-21 | Clean up snmpd's header situation. | Martijn van Duren | |
With the help of tb@ and include-what-you-use. OK tb@ | |||
2023-12-18 | Add a family argument to host(). This allows us to force a specific address | Martijn van Duren | |
family for source-address, which must be in line with the destination address. OK jca@ | |||
2023-12-18 | Fix copy-paste error for setting source-address in trap receiver. | Martijn van Duren | |
OK jca@ | |||
2023-12-18 | Fix two memory leaks: | Martijn van Duren | |
- MIB_snmpInReadOnlys was tried to be registered twice, leading to a leak of the second instance. Prevent this mistake in the future by making a double registration fatal. - The response buffer is owned by the backend, so the backend must also free it. OK tb@ | |||
2023-12-12 | The OID inside snmpTrapOID is of type NOTIFICATION-TYPE, which does not | Martijn van Duren | |
have a zero appended. OK tb@ | |||
2023-12-12 | Do a bitter cleanup after the config defined objects on shutdown. | Martijn van Duren | |
OK tb@ | |||
2023-11-21 | Make RTFILTER/filter-routes a simple boolean assignment, since the | Martijn van Duren | |
specific value isn't used anymore, and is just used to generate an argument for snmpd_metrics. OK tb@ | |||
2023-11-20 | In snmpe_writecb, don't call snmpe_prepare_read() when there's still | Martijn van Duren | |
data left inside sm_data. If there's an incomplete packet left in the buffer it will be called from snmpe_tryparse, if there's a complete packet left we can end up with new events from the tcp socket, which the tcp subsystem isn't prepared to handle. OK tb@ | |||
2023-11-16 | In appl_processpdu() no need to set avi_next, and only set av_next up | Martijn van Duren | |
to varbindlen, since its only use is to print the varbindlist via appl_pdu_log() and both are further properly initialized in appl_request_upstream_resolve(). This fixes a cosmetic off by one for getbulk requests. OK tb@ | |||
2023-11-16 | avi_origid must also be set when transitioning out of the | Martijn van Duren | |
APPL_VBSTATE_MUSTFILL state, else snmpd won't like use once we reach EOMV of our view of the world. OK tb@ | |||
2023-11-15 | Make sure we allocate the correct size for an appl_agentcap. | Martijn van Duren | |
OK claudio@ miod@ | |||
2023-11-13 | Apparently base-gcc doesn't like having OID() inside MIBDECL(). Handroll | Martijn van Duren | |
the OID() logic into MIBDECL(). Found, tested, and OK jca@ OK tb@ | |||
2023-11-13 | struct appl_varbind_internal's avi_index is used to give the index to | Martijn van Duren | |
the original varbindlist's index. In the case of a GetBulkRequest this must never be larger than the length of the original varbindlist. OK tb@ | |||
2023-11-12 | Move struct oid from snmpd.h into smi.c and trim a lot of the now unused | Martijn van Duren | |
fat. This includes all the o_flags member related defines. if it compiles ship it/OK tb@ | |||
2023-11-12 | Remove a bunch of unused smi_ functions and move a couple of definitions | Martijn van Duren | |
out of snmpd.h, which aren't used outside of smi.c OK tb@ | |||
2023-11-12 | Now that smi_oid_cmp() is only used by the oidtree RB-tree, and nothing | Martijn van Duren | |
fancy is using it, we can simply rely on ober_oid_cmp(). OK tb@ | |||
2023-11-12 | Now that MIBDECL() fills in bo_n, no need to call smi_oidlen() anymore. | Martijn van Duren | |
OK tb@ | |||
2023-11-12 | Let MIBDECL() make use of OID(). This gives use bo_n for free and we | Martijn van Duren | |
won't have to rely on error-prone smi_oidlen. OK tb@ | |||
2023-11-12 | Now that smi.c is basically an oid/name translator, let smi_insert() | Martijn van Duren | |
create the struct oid and let parse.y supply the arguments. OK tb@ | |||
2023-11-12 | No need to use struct oid to compare two struct ber_oids. Just call | Martijn van Duren | |
ober_oid_cmp() directly. OK tb@ | |||
2023-11-12 | Printing all known objects inside smi when build with -DDEBUG has no | Martijn van Duren | |
benefit. Remove it and the last consumer of smi_foreach(). OK tb@ | |||
2023-11-12 | No reason to call (error-prone) smi_scalar_oidlen when we include the | Martijn van Duren | |
scalar .0 ourselves. OK tb@ | |||
2023-11-12 | Now that the last consumer of mps.c is gone, remove it and its | Martijn van Duren | |
application_legacy.c companion. OK tb@ | |||
2023-11-12 | Move snmpd.conf's oid keyword into application_internal.c. These objects | Martijn van Duren | |
get registered under their own backend name, so that they can't overlap with the internal regions. This removes the last consumer of mps.c OK tb@ | |||
2023-11-08 | Don't do the time window check if we're noAuthNoPriv. It's only needed | Martijn van Duren | |
if we're authenticating according to RFC3414 section 2.3. OK tb@ | |||
2023-11-08 | Let usm_make_report() utilize appl_report(). usm_make_report utilized | Martijn van Duren | |
mps_getstr(), which after moving the SNMPv2-SMI::snmpV2 into application_internal returned a noSuchObject. This doesn't seem to have broken any tools that I'm aware of, but this returns the correct result. OK tb@ | |||
2023-11-08 | Let appl_report() collect its own metrics. This simplifies the interface | Martijn van Duren | |
and gives us a free report-pdu log line in debug mode. OK tb@ | |||
2023-11-08 | Don't rely on aru_pdu to rebuild the original varbindlist on error. | Martijn van Duren | |
Now that we have avi_origid it's not needed anymore and aru_pdu needs to go. OK tb@ | |||
2023-11-08 | Don't use aru_pdu for determining the requesttype. It's owned by | Martijn van Duren | |
snmp_message and getting rid of it is also needed for appl_report() to gather its own information. OK tb@ | |||
2023-11-08 | On second thought let's not overwrite sm_pdutype with a hardcoded value | Martijn van Duren | |
after just setting it, it's a silly idea. OK tb@ | |||
2023-11-08 | export SNMP-TARGET-MIB::{snmpUnavailableContexts,snmpUnknownContexts} | Martijn van Duren | |
via application_internal. OK tb@ | |||
2023-11-08 | Hook up snmpTargetMIB to MIB_TREE. | Martijn van Duren | |
OK tb@ | |||
2023-11-06 | Hook up agentx-{Add,Remove}AgentCaps-PDU to appl_{add,remove}agentcaps. | Martijn van Duren | |
OK tb@ | |||
2023-11-06 | Readd the sysORTable based on the new struct appl_agentcap. | Martijn van Duren | |
OK tb@ | |||
2023-11-06 | Allow agent capabilities to be stored on a per appl_context basis. | Martijn van Duren | |
This is needed for AgentX's {add,remove}agentcaps, and the sysORTable. OK tb@ | |||
2023-11-06 | Allow appl_internal_object's getnext to be called. | Martijn van Duren | |
OK tb@ | |||
2023-11-04 | Move SNMPv2-MIB::system from mib.c into the new application_internal.c. | Martijn van Duren | |
This was the last consumer of mib.c, so send it to the great bitbucket in the sky. This move removes the sysORTable, but it was basically non-functioning anyway and removal of previous entries from the table didn't caused any fallout that reached my ears. I hope to add proper sysORTable/agent-capabilities support, which is compatible with AgentX's {Add,Remove}AgentCaps, soon. OK tb@ | |||
2023-11-04 | Move SNMPv2-SMI::snmpV2 from mib.c into the new application_internal.c | Martijn van Duren | |
OK tb@ | |||
2023-11-04 | Move SNMPv2-MIB::snmp from mib.c into the new application_internal.c | Martijn van Duren | |
OK tb@ | |||
2023-11-04 | Introduce application_internal.c. This backend is meant to replace | Martijn van Duren | |
application_legacy.c, mps.c, and mib.c. This commit just introduces the backend. The existing MIBs inside mib.c will be copied over in subsequent commits. OK tb@ | |||
2023-10-29 | When doing a get{next,bulk} below an instance we must move the OID to | Martijn van Duren | |
the next sibling. Not simply copying over the value of the next to use region, since that might be the parent and we would walk backwards in the tree. OK tb@ | |||
2023-10-29 | searchrange.end is non-inclusive. Adjust the tests for that. | Martijn van Duren | |
OK tb@ | |||
2023-10-27 | If an invalid varbindlist was returned by a backend we would call | Martijn van Duren | |
appl_request_upstream_resolve() twice where the first call would already return a reply and free the upstream request, leading to a use after free. Make appl_request_downstream_free() call appl_request_upstream_resolve() unconditionally and remove the call from appl_response(). OK tb@ | |||
2023-10-27 | Use event_add(), instead of calling appl_agentx_send() directly. If an | Martijn van Duren | |
error occurs the connection will be freed and if the caller uses the connection afterwards it will lead to a use after free. OK tb@ | |||
2023-10-24 | FC3416 section 4.2.1 (and others) tells us that if an error occurs the | Martijn van Duren | |
varbindlist in the response must be identical to the original request. OK tb@ | |||
2023-10-24 | Certain error codes are only intended for certain request-types. Add an | Martijn van Duren | |
appl_error_valid() function to test for this. OK tb@ | |||
2023-10-24 | If a backend registers as an instance it must never return OIDs below | Martijn van Duren | |
their registration. Add a test for this in appl_varbind_valid(). OK and minor nit tb@ |