luci-proto-ppp: add ac_mac and IPv6-PD options
authorAndy Chiang <[email protected]>
Sun, 19 Oct 2025 17:52:53 +0000 (00:52 +0700)
committerPaul Donald <[email protected]>
Wed, 3 Dec 2025 18:51:00 +0000 (19:51 +0100)
add ac_mac and IPv6-PD options

Signed-off-by: Andy Chiang <[email protected]>
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/ppp.js
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoa.js
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoe.js
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pptp.js

index 6d3db0fbe3f636e638211fde62cb5c58e0785f2f..f9761c222cbe335f606b3013a4323aea34f5323b 100644 (file)
@@ -99,6 +99,16 @@ return network.registerProtocol('ppp', {
                        o.default = 'auto';
                }
 
+               o = s.taboption('advanced', form.Value, 'reqprefix', _('Request IPv6-prefix'),
+                       _('Either a prefix length hint (e.g. 56) only, whereby the operator selects the prefix, or specify a prefix also (e.g. %s)')
+                       .format('<code>2001:db8::/56</code>'));
+               o.depends("ppp_ipv6", "auto");
+
+               o = s.taboption('advanced', form.Flag, 'norelease', _('Do not send a Release when restarting'), _('Enable to minimise the chance of prefix change after a restart'));
+               o.depends("ppp_ipv6", "auto");
+               o.default = '1';
+               o.rmempty = false;
+
                o = s.taboption('advanced', form.Value, '_keepalive_failure', _('LCP echo failure threshold'), _('Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures'));
                o.placeholder = '5';
                o.datatype    = 'uinteger';
index 8955d0972525c6352546612bcfd2ab9c16b11b12..5c3e87c8a9abd2608963c9bc4a994f434e785921 100644 (file)
@@ -85,6 +85,16 @@ return network.registerProtocol('pppoa', {
                        o.default = 'auto';
                }
 
+               o = s.taboption('advanced', form.Value, 'reqprefix', _('Request IPv6-prefix'),
+                       _('Either a prefix length hint (e.g. 56) only, whereby the operator selects the prefix, or specify a prefix also (e.g. %s)')
+                       .format('<code>2001:db8::/56</code>'));
+               o.depends("ppp_ipv6", "auto");
+
+               o = s.taboption('advanced', form.Flag, 'norelease', _('Do not send a Release when restarting'), _('Enable to minimise the chance of prefix change after a restart'));
+               o.depends("ppp_ipv6", "auto");
+               o.default = '1';
+               o.rmempty = false;
+
                o = s.taboption('advanced', form.Value, '_keepalive_failure', _('LCP echo failure threshold'), _('Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures'));
                o.placeholder = '5';
                o.datatype    = 'uinteger';
index 5fbeca8c10d62c9b165a46944d9a6bb421c6c908..d66da8a0212aa464a5e7b0a35455e3fefebfc9ef 100644 (file)
@@ -47,6 +47,12 @@ return network.registerProtocol('pppoe', {
                o = s.taboption('general', form.Value, 'ac', _('Access Concentrator'), _('Leave empty to autodetect'));
                o.placeholder = _('auto');
 
+               o = s.taboption('general', form.Value, 'ac_mac',
+                       '<abbr title="%s">%s</abbr>'.format(_('Access Concentrator'), _('AC')) + ' ' + _('MAC Address'),
+                       _('Leave empty to autodetect'));
+               o.placeholder = _('auto');
+               o.datatype    = 'macaddr';
+
                o = s.taboption('general', form.Value, 'service', _('Service Name'), _('Leave empty to autodetect'));
                o.placeholder = _('auto');
 
@@ -59,6 +65,16 @@ return network.registerProtocol('pppoe', {
                        o.default = 'auto';
                }
 
+               o = s.taboption('advanced', form.Value, 'reqprefix', _('Request IPv6-prefix'),
+                       _('Either a prefix length hint (e.g. 56) only, whereby the operator selects the prefix, or specify a prefix also (e.g. %s)')
+                       .format('<code>2001:db8::/56</code>'));
+               o.depends("ppp_ipv6", "auto");
+
+               o = s.taboption('advanced', form.Flag, 'norelease', _('Do not send a Release when restarting'), _('Enable to minimise the chance of prefix change after a restart'));
+               o.depends("ppp_ipv6", "auto");
+               o.default = '1';
+               o.rmempty = false;
+
                o = s.taboption('advanced', form.Value, '_keepalive_failure', _('LCP echo failure threshold'), _('Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures'));
                o.placeholder = '5';
                o.datatype    = 'uinteger';
index abb006700fc5ea778f304362af8e6624c3e0d3c9..d65b079b7d2c2c11f68c2a560d837e87ca59fb9b 100644 (file)
@@ -72,6 +72,16 @@ return network.registerProtocol('pptp', {
                        o.default = 'auto';
                }
 
+               o = s.taboption('advanced', form.Value, 'reqprefix', _('Request IPv6-prefix'),
+                       _('Either a prefix length hint (e.g. 56) only, whereby the operator selects the prefix, or specify a prefix also (e.g. %s)')
+                       .format('<code>2001:db8::/56</code>'));
+               o.depends("ppp_ipv6", "auto");
+
+               o = s.taboption('advanced', form.Flag, 'norelease', _('Do not send a Release when restarting'), _('Enable to minimise the chance of prefix change after a restart'));
+               o.depends("ppp_ipv6", "auto");
+               o.default = '1';
+               o.rmempty = false;
+
                o = s.taboption('advanced', form.Value, '_keepalive_failure', _('LCP echo failure threshold'), _('Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures'));
                o.placeholder = '5';
                o.datatype    = 'uinteger';