- foreach (filter_params_t *param, filter->params) {
- /* file parameter is:
- * [no]lock:weight:filename
- * valid options are:
- * - lock: memlock the database in memory.
- * - nolock: don't memlock the database in memory [default].
- * - \d+: a number describing the weight to give to the match
- * the given list [mandatory]
- * the file pointed by filename MUST be a valid ip list issued from
- * the rsync (or equivalent) service of a (r)bl.
- */
- if (strcmp(param->name, "file") == 0) {
+ foreach (filter_param_t *param, filter->params) {
+ switch (param->type) {
+ /* file parameter is:
+ * [no]lock:weight:filename
+ * valid options are:
+ * - lock: memlock the database in memory.
+ * - nolock: don't memlock the database in memory [default].
+ * - \d+: a number describing the weight to give to the match
+ * the given list [mandatory]
+ * the file pointed by filename MUST be a valid ip list issued from
+ * the rsync (or equivalent) service of a (r)bl.
+ */
+ case ATK_FILE: {