Skip to content
Open
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
24 changes: 0 additions & 24 deletions helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,6 @@ const struct fw3_option fw3_cthelper_opts[] = {
};


static bool
test_module(struct fw3_cthelper *helper)
{
struct stat s;
char path[sizeof("/sys/module/nf_conntrack_xxxxxxxxxxxxxxxx")];

snprintf(path, sizeof(path), "/sys/module/%s", helper->module);

if (stat(path, &s) || !S_ISDIR(s.st_mode))
return false;

return true;
}

static bool
check_cthelper_proto(const struct fw3_cthelper *helper)
{
Expand Down Expand Up @@ -288,9 +274,6 @@ fw3_print_cthelpers(struct fw3_ipt_handle *handle, struct fw3_state *state,
if (!fw3_is_family(helper, handle->family))
continue;

if (!test_module(helper))
continue;

expand_helper_rule(handle, helper, zone);
}
}
Expand All @@ -306,13 +289,6 @@ fw3_print_cthelpers(struct fw3_ipt_handle *handle, struct fw3_state *state,
if (!fw3_is_family(helper, handle->family))
continue;

if (!test_module(helper))
{
info(" ! Conntrack module '%s' for helper '%s' is not loaded",
helper->module, helper->name);
continue;
}

expand_helper_rule(handle, helper, zone);
}
}
Expand Down