net-mgmt/net-snmp: fix sysServices (#4307)

The plugin offers an option to enable "Layer 3 Visibility" which leads to the sysServices OID being set to 76.

This boils down to the following services being advertised:

datalink/subnetwork
internet
end-to-end
I really don't know why this is necessary as an option and not simply hardwired - but maybe OPNsense as a transparent bridge does not count as an internet/IP providing system. I can see that ...

That being said in the absence of that option the sysServices OID is not set at all which I consider a bug. It should be set to 72 instead. This pull request does exactly that.

Reference:

https://oidref.com/1.3.6.1.4.1.1978.2.18.1.7
This commit is contained in:
Patrick M. Hausen
2024-10-18 12:54:30 +02:00
committed by GitHub
parent f0d52376a5
commit 6eb2c50d22
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -14,6 +14,7 @@ Plugin Changelog
1.6
* Add support for Observium (contributed by Patrick M. Hausen)
* Fix sysServices value in case "Layer 3 Visibility" option is unchecked (contributed by Patrick M. Hausen)
1.5
@@ -49,6 +49,8 @@ sysContact {{ OPNsense.netsnmp.general.syscontact }}
{% if helpers.exists('OPNsense.netsnmp.general.l3visibility') and OPNsense.netsnmp.general.l3visibility == '1' %}
sysServices 76
{% else %}
sysServices 72
{% endif %}
{% if helpers.exists('OPNsense.netsnmp.general.versionoid') and OPNsense.netsnmp.general.versionoid == '1' %}