From 64b24b02edbcf1c586fcfd0c204996c342d0d5ed Mon Sep 17 00:00:00 2001 From: Maximilian Wilhelm Date: Sun, 30 Aug 2020 22:18:07 +0200 Subject: [PATCH] Remove leading whitespaces before interface attribute values. Signed-off-by: Maximilian Wilhelm --- libifupdown/interface-file.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libifupdown/interface-file.c b/libifupdown/interface-file.c index 06a3c66..7589841 100644 --- a/libifupdown/interface-file.c +++ b/libifupdown/interface-file.c @@ -146,6 +146,10 @@ handle_generic(struct lif_dict *collection, const char *filename, size_t lineno, token = maybe_remap_token(token); + /* Skip any leading whitespaces in value for */ + while (isspace (*bufp)) + bufp++; + lif_dict_add(&cur_iface->vars, token, strdup(bufp)); /* Check if token looks like - and assume is an addon */