1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2019-08-07 08:05:51 +02:00
parent 7165fb2df1
commit 35d65227ac
4 changed files with 29 additions and 8 deletions

View file

@ -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