Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(userspace/falco): use correct filtercheck_field_info. #3426

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading