luci-mod-network: avoid needlessly writing none
RA flags
Fixes: #5725 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
f2f7e0c1f7
commit
f04011f068
1 changed files with 8 additions and 1 deletions
|
@ -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.'));
|
||||
|
|
Loading…
Reference in a new issue