Werk #18341: snmplib: Always use SNMPv3 contexts in requests

Component Checks & agents
Title snmplib: Always use SNMPv3 contexts in requests
Date Jul 16, 2025
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.5.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.4.0p9 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0p35 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.2.0p45 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

When an SNMPv3 device (e.g. a printer from HP or Brother) required a context, the connection test and service discovery failed with the following error:

SNMP Error on <hostname> while walking .1.3.6.1.2.1.1.1. Normally this is caused by a device sending invalid SNMP responses (Details: Bad context specified (0/-17)).

This error was caused by an incorrect assumption in the filtering of the "SNMPv3 contexts to use in requests" rules.

With this change, the filter algorithm returns the context valid for all SNMP sections even if the request was not specific to a single SNMP section.

To the list of all Werks