summaryrefslogtreecommitdiffhomepage
path: root/module/public-core
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-04-22 16:07:02 +0000
committerSteven Barth <steven@midlink.org>2008-04-22 16:07:02 +0000
commit187bbe4bbec7cb22c33df9c805c829e939892016 (patch)
tree700a50697a81f8e07981ea5680764b96d87b4942 /module/public-core
parenteb9a1093c274bf33f9d7a798f0030821da637663 (diff)
* ffluci.sys.net.hexip4: Added option for big endian support
* ffluci.cbi.TypedSection.cfgsections: Check whether there are any configuration sections before iterating * ffluci.view.public_status.routes: Added "fix" for big endian systems
Diffstat (limited to 'module/public-core')
-rw-r--r--module/public-core/src/view/public_status/routes.htm15
1 files changed, 11 insertions, 4 deletions
diff --git a/module/public-core/src/view/public_status/routes.htm b/module/public-core/src/view/public_status/routes.htm
index 046c789f91..156a0336fc 100644
--- a/module/public-core/src/view/public_status/routes.htm
+++ b/module/public-core/src/view/public_status/routes.htm
@@ -10,11 +10,18 @@
<th><%:metric Metrik%></th>
<th><%:iface Schnittstelle%></th>
</tr>
-<% for i, r in pairs(ffluci.sys.net.routes()) do %>
+<%
+local routes = ffluci.sys.net.routes()
+
+-- UGLY hack is UGLY
+local be = (routes[1] and routes[1].Mask:sub(-2) == "00")
+
+for i, r in pairs(routes) do
+%>
<tr>
-<td><%=ffluci.sys.net.hexip4(r.Destination)%></td>
-<td><%=ffluci.sys.net.hexip4(r.Mask)%></td>
-<td><%=ffluci.sys.net.hexip4(r.Gateway)%></td>
+<td><%=ffluci.sys.net.hexip4(r.Destination, be)%></td>
+<td><%=ffluci.sys.net.hexip4(r.Mask, be)%></td>
+<td><%=ffluci.sys.net.hexip4(r.Gateway, be)%></td>
<td><%=r.Metric%></td>
<td><%=r.Iface%></td>
</tr>