summaryrefslogtreecommitdiffhomepage
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-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>