local util = require "luci.util"
local table = require "table"
+local type = type
module "luci.tools.ffwizard"
local aliases = {iface}
cursor:foreach("network", "alias",
function(section)
- table.insert(aliases, section[".name"])
+ if section.interface == iface then
+ table.insert(aliases, section[".name"])
+ end
end)
-- Delete Aliases and Routes
- cursor:delete_all("network", nil, {interface=iface})
+ cursor:delete_all("network", "route", {interface=iface})
+ cursor:delete_all("network", "alias", {interface=iface})
-- Delete DHCP sections
cursor:delete_all("dhcp", "dhcp",