luci-app-snmpd: set default encryption and authentification
authorChristian Korber <redacted>
Wed, 17 Jun 2026 06:56:26 +0000 (08:56 +0200)
committerFlorian Eckert <redacted>
Thu, 18 Jun 2026 08:50:52 +0000 (10:50 +0200)
If no authentification or encryption is specified, the default value is
dropped in LuCI. So in order to keep the default rmempty is set to
false, because otherwise it is not saved.

Signed-off-by: Christian Korber <redacted>
applications/luci-app-snmpd/htdocs/luci-static/resources/view/snmpd/snmpd.js

index a78953e6ec44dc21454a1d06d33479c446c117af..b7b864e3a8f41201ff71f971ba6740fe3c6aa624 100644 (file)
@@ -464,8 +464,8 @@ return L.view.extend({
                go.value('SHA-224', _('SHA-224'));
                go.value('SHA', _('SHA'));
                go.value('MD5', _('MD5'));
-               go.rmempty = true;
                go.default = 'SHA-256';
+               go.rmempty = false;
 
                // SNMPv3 auth pass
                go = g.option(form.Value, 'auth_pass',
@@ -485,8 +485,8 @@ return L.view.extend({
                go.value('AES-192', _('AES-192'));
                go.value('AES', _('AES'));
                go.value('DES', _('DES'));
-               go.rmempty = true;
                go.default = 'AES';
+               go.rmempty = false;
 
                // SNMPv3 privacy/encryption pass
                go = g.option(form.Value, 'privacy_pass',
git clone https://git.99rst.org/PROJECT