Let snmpd check a response package against the requested searchrange end.
authormartijn <martijn@openbsd.org>
Mon, 29 Aug 2022 13:19:05 +0000 (13:19 +0000)
committermartijn <martijn@openbsd.org>
Mon, 29 Aug 2022 13:19:05 +0000 (13:19 +0000)
commit1345d1c8eaf599aaac2c160e691f2fcead5c0e49
tree270f79c7a01ef35141f6e79b826d164ea96c40f0
parentfd375ddbd86e7302335cc70f2fd7fa81c2914824
Let snmpd check a response package against the requested searchrange end.

If the returned OID is beyond the searchrange end we have two cases:
- If the backend supports searchranges (agentx) we generate a GENERR and
  close the connection.
- If the backend doesn't support searchranges (legacy and maybe a future
  snmp proxy) we simply fix-up the result.

OK tb@
usr.sbin/snmpd/application.c
usr.sbin/snmpd/application.h