modules/admin-full: fix exception in interface status page for devices with an empty ifname for wan (#71)
This commit is contained in:
parent
e35dccbc75
commit
30a15ca081
1 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ $Id$
|
||||||
end
|
end
|
||||||
|
|
||||||
function get_vlan(i)
|
function get_vlan(i)
|
||||||
return i:match("^%w+%.(%d+)$")
|
return i and i:match("^%w+%.(%d+)$")
|
||||||
end
|
end
|
||||||
|
|
||||||
function get_vlan_ports(i)
|
function get_vlan_ports(i)
|
||||||
|
@ -178,7 +178,7 @@ $Id$
|
||||||
dev = get_ifname(i)
|
dev = get_ifname(i)
|
||||||
vlan = get_vlan(dev)
|
vlan = get_vlan(dev)
|
||||||
|
|
||||||
if devinfo and devinfo[dev] then
|
if dev and devinfo and devinfo[dev] then
|
||||||
%>
|
%>
|
||||||
<h3><%:a_s_if_interface Interface%> <%=i['.name']%></h3>
|
<h3><%:a_s_if_interface Interface%> <%=i['.name']%></h3>
|
||||||
<p style="font-size:90%;padding-left:1em">
|
<p style="font-size:90%;padding-left:1em">
|
||||||
|
|
Loading…
Reference in a new issue