mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add back gateway for DHCP and fix get public IP and netstat
This commit is contained in:
parent
7165fb2df1
commit
35d65227ac
4 changed files with 29 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
|||
-- Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
-- Copyright 2011-2018 Jo-Philipp Wich <jo@mein.io>
|
||||
-- Copyright 2019 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter project
|
||||
-- Licensed to the public under the Apache License 2.0.
|
||||
|
||||
module("luci.controller.admin.network", package.seeall)
|
||||
|
@ -138,6 +139,12 @@ function index()
|
|||
page = entry({"admin", "network", "diag_ping6"}, post("diag_ping6"), nil)
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "network", "diag_getip"}, post("diag_getip"), nil)
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "network", "diag_netstat"}, post("diag_netstat"), nil)
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "network", "diag_traceroute6"}, post("diag_traceroute6"), nil)
|
||||
page.leaf = true
|
||||
-- end
|
||||
|
@ -420,3 +427,11 @@ end
|
|||
function diag_traceroute6(addr)
|
||||
diag_command("traceroute6 -q 1 -w 2 -n %s 2>&1", addr)
|
||||
end
|
||||
|
||||
function diag_getip(addr)
|
||||
diag_command("wget -4 -qO- -T 2 %s 2>&1", addr)
|
||||
end
|
||||
|
||||
function diag_netstat()
|
||||
diag_command("netstat -lapute 2>&1","http://www.none.com/")
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue