diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua index 7152bc4d..31ce6864 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua @@ -158,7 +158,8 @@ function M.get_role_interfaces(uci, role, exclusive) end uci:foreach('gluon', 'interface', function(s) - if M.contains(s.role, role) and (not exclusive or #s.role == 1) then + local roles = s.role or {} + if M.contains(roles, role) and (not exclusive or #roles == 1) then add(s.name) end end)