summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-04-27 12:18:29 +0200
committerJo-Philipp Wich <jo@mein.io>2022-04-27 12:19:13 +0200
commitf04011f0683dbacb8b831733c708bad760ca61df (patch)
tree0951749fccd331b4dea7bcad876be26c1f1b71e3 /modules/luci-mod-network/htdocs/luci-static/resources
parentf2f7e0c1f71199f945e4f936bb1396e0c1f30b33 (diff)
luci-mod-network: avoid needlessly writing `none` RA flags
Fixes: #5725 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static/resources')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js
index f8c7c6a7ff..5b99ae17cd 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js
@@ -805,7 +805,14 @@ return view.extend({
return flags.length ? flags : [ 'other-config' ];
};
so.remove = function(section_id) {
- uci.set('dhcp', section_id, 'ra_flags', [ 'none' ]);
+ var existing = L.toArray(uci.get('dhcp', section_id, 'ra_flags'));
+ if (this.isActive(section_id)) {
+ if (existing.length != 1 || existing[0] != 'none')
+ uci.set('dhcp', section_id, 'ra_flags', [ 'none' ]);
+ }
+ else if (existing.length) {
+ uci.unset('dhcp', section_id, 'ra_flags');
+ }
};
so = ss.taboption('ipv6-ra', form.Value, 'ra_maxinterval', _('Max <abbr title="Router Advertisement">RA</abbr> interval'), _('Maximum time allowed between sending unsolicited <abbr title="Router Advertisement, ICMPv6 Type 134">RA</abbr>. Default is 600 seconds.'));