mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add check on VPS and IP timeout config in web interface and add loop detection
This commit is contained in:
parent
6702b125ca
commit
4c56f5402f
10 changed files with 111 additions and 12 deletions
|
@ -1001,6 +1001,18 @@ function settings_add()
|
|||
local disablegwping = luci.http.formvalue("disablegwping") or "0"
|
||||
ucic:set("openmptcprouter","settings","disablegwping",disablegwping)
|
||||
|
||||
-- VPS timeout
|
||||
local status_vps_timeout = luci.http.formvalue("status_vps_timeout") or "1"
|
||||
ucic:set("openmptcprouter","settings","status_vps_timeout",status_vps_timeout)
|
||||
|
||||
-- IP timeout
|
||||
local status_getip_timeout = luci.http.formvalue("status_getip_timeout") or "1"
|
||||
ucic:set("openmptcprouter","settings","status_getip_timeout",status_getip_timeout)
|
||||
|
||||
-- Enable/disable loop detection
|
||||
local disableloopdetection = luci.http.formvalue("disableloopdetection") or "0"
|
||||
ucic:set("openmptcprouter","settings","disableloopdetection",disableloopdetection)
|
||||
|
||||
-- Enable/disable renaming intf
|
||||
local disableintfrename = luci.http.formvalue("disableintfrename") or "0"
|
||||
ucic:set("openmptcprouter","settings","disableintfrename",disableintfrename)
|
||||
|
|
|
@ -254,6 +254,27 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:VPS checks timeout%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="status_vps_timeout" class="cbi-input-text" value="<%=luci.model.uci.cursor():get("openmptcprouter","settings","status_vps_timeout")%>">
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Timeout for VPS checks on status pages%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:WAN IPs retrieve timeout%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="status_getip_timeout" class="cbi-input-text" value="<%=luci.model.uci.cursor():get("openmptcprouter","settings","status_getip_timeout")%>">
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Timeout for retrieving WANs IP on status pages%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Disable interfaces auto rename%></label>
|
||||
<div class="cbi-value-field">
|
||||
|
@ -290,6 +311,16 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Disable route loop detection%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" name="disableloopdetection" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disableloopdetection") == "1" then %>checked<% end %>>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Disable route loop detection%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Disable tracebox test%></label>
|
||||
<div class="cbi-value-field">
|
||||
|
|
|
@ -463,6 +463,7 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
|
|||
var multipath_state = mArray.wans[i].multipath_state;
|
||||
var duplicateif = mArray.wans[i].duplicateif;
|
||||
var duplicatemac = mArray.wans[i].duplicatemac;
|
||||
var loop = mArray.wans[i].loop;
|
||||
// Generate template
|
||||
if(mArray.openmptcprouter.remote_from_lease == true && mArray.wans.length == 1)
|
||||
{
|
||||
|
@ -622,6 +623,10 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
|
|||
statusMessage += '<%:Network interface MAC address duplicated%>' + '<br />';
|
||||
statusMessageClass = "error";
|
||||
}
|
||||
if(loop)
|
||||
{
|
||||
statusMessage += '<%:Looping route detected%>' + '<br />';
|
||||
}
|
||||
if(ipv6_discover == 'DETECTED')
|
||||
{
|
||||
statusMessage += '<%:IPv6 route received%>' + '<br />'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue