modules/freifunk: handle v6 conditionally (as in network / routes)

This commit is contained in:
Jo-Philipp Wich 2008-11-30 19:29:59 +00:00
parent 46bb17c2d2
commit 008a65e5cc

View file

@ -175,12 +175,13 @@ end
local routes6 = {}
for i, route in ipairs(luci.sys.net.routes6()) do
for i, route in ipairs(luci.sys.net.routes6() or {}) do
if route.dest:prefix() == 0 then
routes6[#routes6+1] = route
end
end
if #routes6 > 0 then
v6 = r:section(Table, routes6)
net = v6:option(DummyValue, "iface", translate("network"))
@ -203,5 +204,6 @@ metric = v6:option(DummyValue, "metric", translate("metric"))
function metric.cfgvalue(self, section)
return string.format("%X", routes6[section].metric)
end
end
return f, m, r