summaryrefslogtreecommitdiffhomepage
path: root/protocols/luci-proto-ppp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/luci-proto-ppp')
-rw-r--r--protocols/luci-proto-ppp/Makefile2
-rw-r--r--protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/ppp.js10
-rw-r--r--protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoa.js10
-rw-r--r--protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoe.js14
-rw-r--r--protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pptp.js10
5 files changed, 24 insertions, 22 deletions
diff --git a/protocols/luci-proto-ppp/Makefile b/protocols/luci-proto-ppp/Makefile
index dd1859ef54..7b60403d88 100644
--- a/protocols/luci-proto-ppp/Makefile
+++ b/protocols/luci-proto-ppp/Makefile
@@ -7,9 +7,9 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Support for PPP/PPPoE/PPPoA/PPtP
-LUCI_DEPENDS:=
PKG_LICENSE:=Apache-2.0
+PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
include ../../luci.mk
diff --git a/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/ppp.js b/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/ppp.js
index d97d4bc29b..c7f7103125 100644
--- a/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/ppp.js
+++ b/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/ppp.js
@@ -26,13 +26,13 @@ function write_keepalive(section_id, value) {
f = (f_opt != null) ? +f_opt[0].formvalue(section_id) : null,
i = (i_opt != null) ? +i_opt[0].formvalue(section_id) : null;
- if (f == null || f == '' || isNaN(f))
- f = 0;
+ if (f === '' || isNaN(f))
+ f = null;
if (i == null || i == '' || isNaN(i) || i < 1)
i = 1;
- if (f > 0)
+ if (f !== null)
uci.set('network', section_id, 'keepalive', '%d %d'.format(f, i));
else
uci.unset('network', section_id, 'keepalive');
@@ -100,7 +100,7 @@ return network.registerProtocol('ppp', {
}
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 = '0';
+ o.placeholder = '5';
o.datatype = 'uinteger';
o.write = write_keepalive;
o.remove = write_keepalive;
@@ -113,7 +113,7 @@ return network.registerProtocol('ppp', {
};
o = s.taboption('advanced', form.Value, '_keepalive_interval', _('LCP echo interval'), _('Send LCP echo requests at the given interval in seconds, only effective in conjunction with failure threshold'));
- o.placeholder = '5';
+ o.placeholder = '1';
o.datatype = 'min(1)';
o.write = write_keepalive;
o.remove = write_keepalive;
diff --git a/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoa.js b/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoa.js
index 79562994cf..b1f945caf9 100644
--- a/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoa.js
+++ b/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoa.js
@@ -11,13 +11,13 @@ function write_keepalive(section_id, value) {
f = (f_opt != null) ? +f_opt[0].formvalue(section_id) : null,
i = (i_opt != null) ? +i_opt[0].formvalue(section_id) : null;
- if (f == null || f == '' || isNaN(f))
- f = 0;
+ if (f === '' || isNaN(f))
+ f = null;
if (i == null || i == '' || isNaN(i) || i < 1)
i = 1;
- if (f > 0)
+ if (f !== null)
uci.set('network', section_id, 'keepalive', '%d %d'.format(f, i));
else
uci.unset('network', section_id, 'keepalive');
@@ -86,7 +86,7 @@ return network.registerProtocol('pppoa', {
}
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 = '0';
+ o.placeholder = '5';
o.datatype = 'uinteger';
o.write = write_keepalive;
o.remove = write_keepalive;
@@ -99,7 +99,7 @@ return network.registerProtocol('pppoa', {
};
o = s.taboption('advanced', form.Value, '_keepalive_interval', _('LCP echo interval'), _('Send LCP echo requests at the given interval in seconds, only effective in conjunction with failure threshold'));
- o.placeholder = '5';
+ o.placeholder = '1';
o.datatype = 'min(1)';
o.write = write_keepalive;
o.remove = write_keepalive;
diff --git a/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoe.js b/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoe.js
index b025a3eeb2..d028a18a87 100644
--- a/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoe.js
+++ b/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoe.js
@@ -11,13 +11,13 @@ function write_keepalive(section_id, value) {
f = (f_opt != null) ? +f_opt[0].formvalue(section_id) : null,
i = (i_opt != null) ? +i_opt[0].formvalue(section_id) : null;
- if (f == null || f == '' || isNaN(f))
- f = 0;
+ if (f === '' || isNaN(f))
+ f = null;
if (i == null || i == '' || isNaN(i) || i < 1)
i = 1;
- if (f > 0)
+ if (f !== null)
uci.set('network', section_id, 'keepalive', '%d %d'.format(f, i));
else
uci.unset('network', section_id, 'keepalive');
@@ -60,7 +60,7 @@ return network.registerProtocol('pppoe', {
}
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 = '0';
+ o.placeholder = '5';
o.datatype = 'uinteger';
o.write = write_keepalive;
o.remove = write_keepalive;
@@ -73,7 +73,7 @@ return network.registerProtocol('pppoe', {
};
o = s.taboption('advanced', form.Value, '_keepalive_interval', _('LCP echo interval'), _('Send LCP echo requests at the given interval in seconds, only effective in conjunction with failure threshold'));
- o.placeholder = '5';
+ o.placeholder = '1';
o.datatype = 'min(1)';
o.write = write_keepalive;
o.remove = write_keepalive;
@@ -93,6 +93,8 @@ return network.registerProtocol('pppoe', {
o.placeholder = '0';
o.datatype = 'uinteger';
- /* pppoe.so has no MTU option - only underlying device MTU is possible */
+ o = s.taboption('advanced', form.Value, 'mtu', _('Override MTU'));
+ o.placeholder = dev ? (dev.getMTU() || '1500') : '1500';
+ o.datatype = 'max(9200)';
}
});
diff --git a/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pptp.js b/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pptp.js
index a8d344fbe5..3ee6e69cb1 100644
--- a/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pptp.js
+++ b/protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pptp.js
@@ -11,13 +11,13 @@ function write_keepalive(section_id, value) {
f = (f_opt != null) ? +f_opt[0].formvalue(section_id) : null,
i = (i_opt != null) ? +i_opt[0].formvalue(section_id) : null;
- if (f == null || f == '' || isNaN(f))
- f = 0;
+ if (f === '' || isNaN(f))
+ f = null;
if (i == null || i == '' || isNaN(i) || i < 1)
i = 1;
- if (f > 0)
+ if (f !== null)
uci.set('network', section_id, 'keepalive', '%d %d'.format(f, i));
else
uci.unset('network', section_id, 'keepalive');
@@ -73,7 +73,7 @@ return network.registerProtocol('pptp', {
}
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 = '0';
+ o.placeholder = '5';
o.datatype = 'uinteger';
o.write = write_keepalive;
o.remove = write_keepalive;
@@ -86,7 +86,7 @@ return network.registerProtocol('pptp', {
};
o = s.taboption('advanced', form.Value, '_keepalive_interval', _('LCP echo interval'), _('Send LCP echo requests at the given interval in seconds, only effective in conjunction with failure threshold'));
- o.placeholder = '5';
+ o.placeholder = '1';
o.datatype = 'min(1)';
o.write = write_keepalive;
o.remove = write_keepalive;