protocols: fix interface.ipv6 vs. device.ipv6 option conflict

Ref: https://forum.openwrt.org/t/pppoe-disable-ipv6/92548
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7d49508480)
This commit is contained in:
Jo-Philipp Wich 2021-03-29 20:34:43 +02:00
parent e5900b3bfe
commit fc43d4d41c
10 changed files with 20 additions and 10 deletions

View file

@ -102,7 +102,8 @@ return network.registerProtocol('3g', {
o.placeholder = '*99***1#';
if (L.hasSystemFeature('ipv6')) {
o = s.taboption('advanced', form.ListValue, 'ipv6', _('Obtain IPv6-Address'));
o = s.taboption('advanced', form.ListValue, 'ppp_ipv6', _('Obtain IPv6-Address'));
o.ucioption = 'ipv6';
o.value('auto', _('Automatic'));
o.value('0', _('Disabled'));
o.value('1', _('Manual'));

View file

@ -94,7 +94,8 @@ return network.registerProtocol('ncm', {
o.placeholder = '*99***1#';
if (L.hasSystemFeature('ipv6')) {
o = s.taboption('advanced', form.ListValue, 'ipv6', _('Obtain IPv6-Address'));
o = s.taboption('advanced', form.ListValue, 'ppp_ipv6', _('Obtain IPv6-Address'));
o.ucioption = 'ipv6';
o.value('auto', _('Automatic'));
o.value('0', _('Disabled'));
o.value('1', _('Manual'));

View file

@ -46,7 +46,8 @@ return network.registerProtocol('l2tp', {
o.password = true;
if (L.hasSystemFeature('ipv6')) {
o = s.taboption('advanced', form.ListValue, 'ipv6', _('Obtain IPv6-Address'), _('Enable IPv6 negotiation on the PPP link'));
o = s.taboption('advanced', form.ListValue, 'ppp_ipv6', _('Obtain IPv6-Address'), _('Enable IPv6 negotiation on the PPP link'));
o.ucioption = 'ipv6';
o.value('auto', _('Automatic'));
o.value('0', _('Disabled'));
o.value('1', _('Manual'));

View file

@ -90,7 +90,8 @@ return network.registerProtocol('ppp', {
o.password = true;
if (L.hasSystemFeature('ipv6')) {
o = s.taboption('advanced', form.ListValue, 'ipv6', _('Obtain IPv6-Address'), _('Enable IPv6 negotiation on the PPP link'));
o = s.taboption('advanced', form.ListValue, 'ppp_ipv6', _('Obtain IPv6-Address'), _('Enable IPv6 negotiation on the PPP link'));
o.ucioption = 'ipv6';
o.value('auto', _('Automatic'));
o.value('0', _('Disabled'));
o.value('1', _('Manual'));

View file

@ -77,7 +77,8 @@ return network.registerProtocol('pppoa', {
o.password = true;
if (L.hasSystemFeature('ipv6')) {
o = s.taboption('advanced', form.ListValue, 'ipv6', _('Obtain IPv6-Address'), _('Enable IPv6 negotiation on the PPP link'));
o = s.taboption('advanced', form.ListValue, 'ppp_ipv6', _('Obtain IPv6-Address'), _('Enable IPv6 negotiation on the PPP link'));
o.ucioption = 'ipv6';
o.value('auto', _('Automatic'));
o.value('0', _('Disabled'));
o.value('1', _('Manual'));

View file

@ -51,7 +51,8 @@ return network.registerProtocol('pppoe', {
o.placeholder = _('auto');
if (L.hasSystemFeature('ipv6')) {
o = s.taboption('advanced', form.ListValue, 'ipv6', _('Obtain IPv6-Address'), _('Enable IPv6 negotiation on the PPP link'));
o = s.taboption('advanced', form.ListValue, 'ppp_ipv6', _('Obtain IPv6-Address'), _('Enable IPv6 negotiation on the PPP link'));
o.ucioption = 'ipv6';
o.value('auto', _('Automatic'));
o.value('0', _('Disabled'));
o.value('1', _('Manual'));

View file

@ -64,7 +64,8 @@ return network.registerProtocol('pptp', {
o.password = true;
if (L.hasSystemFeature('ipv6')) {
o = s.taboption('advanced', form.ListValue, 'ipv6', _('Obtain IPv6-Address'), _('Enable IPv6 negotiation on the PPP link'));
o = s.taboption('advanced', form.ListValue, 'ppp_ipv6', _('Obtain IPv6-Address'), _('Enable IPv6 negotiation on the PPP link'));
o.ucioption = 'ipv6';
o.value('auto', _('Automatic'));
o.value('0', _('Disabled'));
o.value('1', _('Manual'));

View file

@ -90,7 +90,8 @@ return network.registerProtocol('pppossh', {
o.datatype = 'ipaddr("nomask")';
if (L.hasSystemFeature('ipv6')) {
o = s.taboption('advanced', form.Flag, 'ipv6', _('Obtain IPv6-Address'), _('Enable IPv6 negotiation on the PPP link'));
o = s.taboption('advanced', form.Flag, 'ppp_ipv6', _('Obtain IPv6-Address'), _('Enable IPv6 negotiation on the PPP link'));
o.ucioption = 'ipv6';
o.default = o.disabled;
}

View file

@ -86,7 +86,8 @@ return network.registerProtocol('qmi', {
o.password = true;
if (L.hasSystemFeature('ipv6')) {
o = s.taboption('advanced', form.Flag, 'ipv6', _('Enable IPv6 negotiation'));
o = s.taboption('advanced', form.Flag, 'ppp_ipv6', _('Enable IPv6 negotiation'));
o.ucioption = 'ipv6';
o.default = o.disabled;
}

View file

@ -48,7 +48,8 @@ return network.registerProtocol('sstp', {
// -- advanced --------------------------------------------------------------------
o = s.taboption('advanced', form.Flag, 'ipv6', _('IPv6 support'), _('If checked, adds "+ipv6" to the pppd options'));
o = s.taboption('advanced', form.Flag, 'ppp_ipv6', _('IPv6 support'), _('If checked, adds "+ipv6" to the pppd options'));
o.ucioption = 'ipv6';
o = s.taboption('advanced', form.ListValue, 'log_level', _('sstpc Log-level'));
o.value('0', _('0', 'sstp log level value'));