summaryrefslogtreecommitdiffstats
path: root/ipsectools-model.lua
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-09-04 12:17:34 +0000
committerMika Havela <mika.havela@gmail.com>2008-09-04 12:17:34 +0000
commit9d959fdbace25ac2a7f28149793d3fce7000bea1 (patch)
tree7aee412a041e44c1323d074c25e74756c0696db2 /ipsectools-model.lua
parent4de7eb4012b329dd4b2c3413cc86e54bcb7e5a06 (diff)
downloadacf-ipsec-tools-9d959fdbace25ac2a7f28149793d3fce7000bea1.tar.bz2
acf-ipsec-tools-9d959fdbace25ac2a7f28149793d3fce7000bea1.tar.xz
Removing some details from the statuspage so it gets cleaner and not so technical
git-svn-id: svn://svn.alpinelinux.org/acf/ipsec-tools/trunk@1445 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'ipsectools-model.lua')
-rw-r--r--ipsectools-model.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/ipsectools-model.lua b/ipsectools-model.lua
index 9e68b3d..c30fbb7 100644
--- a/ipsectools-model.lua
+++ b/ipsectools-model.lua
@@ -46,8 +46,8 @@ end
local function phase2details(dst)
local output = {}
dst = string.match(dst,"^(.*)%.") -- Removes the portnumber
- table.insert(output, {label="Outgoing", value=ip_xfrm("state list src ".. dst)})
- table.insert(output, {label="Incoming", value=ip_xfrm("state list dst ".. dst)})
+ table.insert(output, {label="Outgoing", value=ip_xfrm("state list src ".. dst .. " | grep '^src'")})
+ table.insert(output, {label="Incoming", value=ip_xfrm("state list dst ".. dst .. " | grep '^src'")})
return output
end
@@ -105,11 +105,18 @@ local function racoonctl_table()
value=(variable[8] or "") .. " " .. (variable[9] or ""),
})
+ local phase2s = phase2details(variable[2])
output[k]['Phase2']=cfe({
name="Phase2",
label="Phase2",
value=variable[10],
- option=phase2details(variable[2]),
+ option=phase2s,
+ })
+
+ output[k]['Phase2details']=cfe({
+ name="Phase2details",
+ label="Phase2details",
+ value=tostring(string.gsub(phase2s[1]['value'],"\n","<BR>")) .. tostring(string.gsub(phase2s[2]['value'],"\n","<BR>"))
})
end
end