Skip to content

Commit

Permalink
fix(userspace/falco): use correct filtercheck_field_info.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
  • Loading branch information
FedeDP authored and poiana committed Dec 6, 2024
1 parent 257ae9a commit f8feea6
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions userspace/falco/app/actions/init_falco_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ limitations under the License.
using namespace falco::app;
using namespace falco::app::actions;

static inline std::string format_suggested_field(const filter_check_info* info) {
static inline std::string format_suggested_field(const filtercheck_field_info* info) {
std::ostringstream out;

// Replace "foo.bar" with "foo_bar"
Expand All @@ -46,12 +46,15 @@ static void add_suggested_output(const falco::app::state& s,
std::vector<const filter_check_info*> fields;
filterchecks.get_all_fields(fields);
for(const auto& fld : fields) {
if(fld->m_fields->is_format_suggested()) {
s.engine->add_extra_output_format(format_suggested_field(fld),
src,
eo.m_tags,
eo.m_rule,
false);
for(int i = 0; i < fld->m_nfields; i++) {
const auto* fldinfo = &fld->m_fields[i];
if(fldinfo->is_format_suggested()) {
s.engine->add_extra_output_format(format_suggested_field(fldinfo),
src,
eo.m_tags,
eo.m_rule,
false);
}
}
}
}
Expand Down

0 comments on commit f8feea6

Please sign in to comment.