From d814aa754f6771e479632c0fcf4aadcd2b2e0f0c Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Tue, 15 Sep 2020 05:48:54 -0600 Subject: [PATCH] config parser: explicitly skip over comments --- libifupdown/config-parser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libifupdown/config-parser.c b/libifupdown/config-parser.c index f533cfb..45005c6 100644 --- a/libifupdown/config-parser.c +++ b/libifupdown/config-parser.c @@ -48,6 +48,9 @@ lif_config_parse_file(FILE *fd, const char *filename, struct lif_config_handler if (!*key || !*value) continue; + if (*key == '#') + continue; + struct lif_config_handler *hdl = bsearch(key, handlers, handler_count, sizeof(*handlers), handler_cmp);