lib: Add default config fallback for configured namespace
authorTobias Brunner <tobias@strongswan.org>
Tue, 28 Jan 2014 15:36:50 +0000 (16:36 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 12 Feb 2014 13:34:32 +0000 (14:34 +0100)
All settings in the configured global namespace fall back to libstrongswan.

src/libstrongswan/library.c

index e0876ef..c075fd8 100644 (file)
@@ -293,6 +293,9 @@ bool library_init(char *settings, const char *namespace)
        this->objects = hashtable_create((hashtable_hash_t)hash,
                                                                         (hashtable_equals_t)equals, 4);
        this->public.settings = settings_create(settings);
+       /* all namespace settings may fall back to libstrongswan */
+       lib->settings->add_fallback(lib->settings, lib->ns, "libstrongswan");
+
        this->public.hosts = host_resolver_create();
        this->public.proposal = proposal_keywords_create();
        this->public.caps = capabilities_create();