diff --git a/src/config.c b/src/config.c index b3a521c..1aacbf9 100644 --- a/src/config.c +++ b/src/config.c @@ -132,6 +132,13 @@ f2b_config_section_create(const char *src) { return section; } + name = "source:"; + if (strncmp(line, name, strlen(name)) == 0) { + section->type = t_source; + strlcpy(section->name, line + strlen(name), sizeof(section->name)); + return section; + } + name = "backend:"; if (strncmp(line, name, strlen(name)) == 0) { section->type = t_backend; @@ -305,6 +312,7 @@ f2b_config_section_append(f2b_config_t *config, f2b_config_section_t *section) { switch (section->type) { case t_main: s = &config->main; break; case t_defaults: s = &config->defaults; break; + case t_source: s = &config->sources; break; case t_filter: s = &config->filters; break; case t_backend: s = &config->backends; break; case t_jail: s = &config->jails; break; diff --git a/src/config.h b/src/config.h index 249f3c5..e7fe646 100644 --- a/src/config.h +++ b/src/config.h @@ -16,6 +16,7 @@ typedef enum f2b_section_type { t_unknown = 0, t_main, t_defaults, + t_source, t_filter, t_backend, t_jail, @@ -38,6 +39,7 @@ typedef struct f2b_config_section_t { typedef struct f2b_config_t { f2b_config_section_t *main; f2b_config_section_t *defaults; + f2b_config_section_t *sources; f2b_config_section_t *filters; f2b_config_section_t *backends; f2b_config_section_t *jails;