luci-proto-ppp: add ac_mac and IPv6-PD options
Some checks failed
LuCI repo CodeQL Analysis / Analyze JavaScript and JSON (javascript-typescript) (push) Has been cancelled

add ac_mac and IPv6-PD options

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
This commit is contained in:
Andy Chiang
2025-10-20 00:52:53 +07:00
committed by Paul Donald
parent 684d508b67
commit fb3b96ec65
4 changed files with 46 additions and 0 deletions

View 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';

View 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';

View 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';

View 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';