modules/admin-full: fix "undefined" netmask display on main status page
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 31 Jul 2011 12:37:22 +0000 (12:37 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 31 Jul 2011 12:37:22 +0000 (12:37 +0000)
modules/admin-full/luasrc/view/admin_status/index.htm

index 16cd32a..aab8ead 100644 (file)
@@ -140,7 +140,7 @@ $Id$
                                                '<strong><%:Gateway%>: </strong>%s<br />',
                                                        ifc.proto,
                                                        (ifc.ipaddr) ? ifc.ipaddr : '0.0.0.0',
-                                                       (ifc.netmask != ifc.ipaddr) ? ifc.netmask : '255.255.255.255',
+                                                       (ifc.netmask && ifc.netmask != ifc.ipaddr) ? ifc.netmask : '255.255.255.255',
                                                        (ifc.gwaddr) ? ifc.gwaddr : '0.0.0.0'
                                        );