config: ignore config parser errors
authorFelix Fietkau <nbd@openwrt.org>
Mon, 31 Mar 2014 20:23:35 +0000 (22:23 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 31 Mar 2014 20:23:37 +0000 (22:23 +0200)
This helps with keeping routers reachable when there are typos in the
network config.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
config.c

index 4fe72dc..14a91a5 100644 (file)
--- a/config.c
+++ b/config.c
@@ -190,6 +190,7 @@ config_init_package(const char *config)
                ctx = uci_alloc_context();
                uci_ctx = ctx;
 
                ctx = uci_alloc_context();
                uci_ctx = ctx;
 
+               ctx->flags &= ~UCI_FLAG_STRICT;
                if (config_path)
                        uci_set_confdir(ctx, config_path);
 
                if (config_path)
                        uci_set_confdir(ctx, config_path);