diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2016-03-17 15:32:26 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2016-03-17 15:32:26 +0100 |
commit | 516689a646351ab86dd126bd0a69851c77733e96 (patch) | |
tree | 259236c63c1f9d7632ef1bfd7042ac3ab701573c /modules/luci-mod-admin-full/luasrc | |
parent | b77602f2e7ab72e7a20917b7c4ca1c2c01554aeb (diff) | |
parent | a77ff30057c691009dac646adbac28d6230814b6 (diff) |
Merge pull request #655 from hnyman/nat6
Add support for showing ipv6 NAT table in Luci
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm index f49469a599..3f4b83b80b 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm @@ -9,6 +9,7 @@ require "luci.sys.iptparser" local wba = require "luci.tools.webadmin" local fs = require "nixio.fs" + local io = require "io" local has_ip6tables = fs.access("/usr/sbin/ip6tables") local mode = 4 @@ -47,6 +48,15 @@ local tables = { "Filter", "NAT", "Mangle", "Raw" } if mode == 6 then tables = { "Filter", "Mangle", "Raw" } + local ok, lines = pcall(io.lines, "/proc/net/ip6_tables_names") + if ok and lines then + local line + for line in lines do + if line == "nat" then + tables = { "Filter", "NAT", "Mangle", "Raw" } + end + end + end end -%> |