From 026945ae09515980f972228442c857e1f9cb4f7f Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 13 Mar 2011 17:39:36 +0000 Subject: [PATCH] modules/admin-full: display source and destination ports in conntrack view (#211) --- .../luasrc/view/admin_status/conntrack.htm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/admin-full/luasrc/view/admin_status/conntrack.htm b/modules/admin-full/luasrc/view/admin_status/conntrack.htm index d21faf704..2697c1cda 100644 --- a/modules/admin-full/luasrc/view/admin_status/conntrack.htm +++ b/modules/admin-full/luasrc/view/admin_status/conntrack.htm @@ -1,7 +1,7 @@ <%# LuCI - Lua Configuration Interface Copyright 2008-2009 Steven Barth -Copyright 2008-2009 Jo-Philipp Wich +Copyright 2008-2011 Jo-Philipp Wich Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -61,8 +61,16 @@ $Id$ <%=c.layer3:upper()%> <%=c.layer4:upper()%> - <%=c.src%> - <%=c.dst%> + <%= + c.layer3 == "ipv6" + and "[%s]:%d" %{ c.src, c.sport } + or "%s:%d" %{ c.src, c.sport } + %> + <%= + c.layer3 == "ipv6" + and "[%s]:%d" %{ c.dst, c.dport } + or "%s:%d" %{ c.dst, c.dport } + %> <% style = not style; end) %> @@ -70,6 +78,5 @@ $Id$
- -<%+footer%> +<%+footer%> -- 2.25.1