diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2021-04-20 21:06:42 +0300 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2021-04-20 21:06:42 +0300 |
commit | b7dd10da0fcdc9c69857d848ce1d47243998a22c (patch) | |
tree | 0c03db81bab6d83e0b2c3819c4dbb5274c314a68 /modules/luci-mod-network/htdocs/luci-static | |
parent | c05bd1990fc9df234b24141ddd10cd91c5e067f6 (diff) |
luci-mod-network: fix handling of optional RA/NDP options
Fix the handling of optional IPv6 RA and NDP options
that were exposed to LuCI with 504bdb23f
Commit 504bdb23f defined them optional but provided default values.
Those values might get unnecessarily written to /etc/config dhcp when
the the user modifies some other values. Remove the default values,
but provide placeholder for some of them.
Add the missing optional definition to 'ndproxy_routing'.
(It is a flag, so optional default values do not get written to
the config file.)
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js | 8 |
1 files changed, 3 insertions, 5 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 4a2e94faf6..580f2885dd 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 @@ -568,7 +568,7 @@ return view.extend({ so = ss.taboption('ipv6', 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 (<code>600</code>).')); so.optional = true; - so.default = '600'; + so.placeholder = '600'; so.depends('ra', 'server'); so.depends('ra', 'hybrid'); so.depends('ra', 'relay'); @@ -577,7 +577,7 @@ return view.extend({ so = ss.taboption('ipv6', form.Value, 'ra_mininterval', _('Min <abbr title="Router Advertisement">RA</abbr> interval'), _('Minimum time allowed \ between sending unsolicited <abbr title="Router Advertisement, ICMPv6 Type 134">RA</abbr>. Default is 200 seconds (<code>200</code>).')); so.optional = true; - so.default = '200'; + so.placeholder = '200'; so.depends('ra', 'server'); so.depends('ra', 'hybrid'); so.depends('ra', 'relay'); @@ -586,7 +586,6 @@ return view.extend({ in <abbr title="Router Advertisement, ICMPv6 Type 134">RA</abbr> messages. Default is 1800 seconds (<code>1800</code>). \ Max 9000 seconds.')); so.optional = true; - so.default = '1800'; so.depends('ra', 'server'); so.depends('ra', 'hybrid'); so.depends('ra', 'relay'); @@ -595,7 +594,6 @@ return view.extend({ to be published in <abbr title="Router Advertisement, ICMPv6 Type 134">RA</abbr> messages. Default is 0 (<code>0</code>).\ Min 1280.')); so.optional = true; - so.default = '0'; so.depends('ra', 'server'); so.depends('ra', 'hybrid'); so.depends('ra', 'relay'); @@ -604,7 +602,6 @@ return view.extend({ to be published in <abbr title="Router Advertisement">RA</abbr> messages.<br />Default is 0 (<code>0</code>), meaning unspecified.\ Max 255.')); so.optional = true; - so.default = '0'; so.depends('ra', 'server'); so.depends('ra', 'hybrid'); so.depends('ra', 'relay'); @@ -657,6 +654,7 @@ return view.extend({ so = ss.taboption('ipv6', form.Flag, 'ndproxy_routing', _('Learn routes from NDP'), _('Default is on.')); so.default = '1'; + so.optional = true; so = ss.taboption('ipv6', form.Flag, 'ndproxy_slave', _('NDP-Proxy slave'), _('Set interface as NDP-Proxy external slave. Default is off.')); |