]> git.ipfire.org Git - thirdparty/strongswan.git/commit
plugin-loader: Optionally use load option in each plugin section to load plugins
authorTobias Brunner <tobias@strongswan.org>
Wed, 22 Jan 2014 14:29:45 +0000 (15:29 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 12 Feb 2014 13:34:33 +0000 (14:34 +0100)
commit190a27885435f683ecd8e1d0240559ae10229a44
tree8d2862a342a334e2bb31f6e2103044a6a820046a
parent79962d9e995b6805c39b0dd3fc3e8d3d974d9abf
plugin-loader: Optionally use load option in each plugin section to load plugins

This now works because all plugins use the same config namespace.

If <ns>.load_modular is true, the list of plugins to load is determined
via the value of the <ns>.plugins.<name>.load options.

Using includes the following is possible:

charon {
  load_modular = yes
  plugins {
    include strongswan.d/charon/*.conf
  }
}

charon-cmd {
  load_modular = yes
  plugins {
    include strongswan.d/charon-cmd/*.conf
  }
}

Where each .conf file would contain something like:

<name> {
  load = yes
  <option> = <value>
}

To increase the priority of individual plugins load = <priority> can be
used (the default is 1).  For instance, to use openssl instead of the
built-in crypto plugins set in strongswan.d/charon/openssl.conf:

openssl {
  load = 10
}

If two plugins have the same priority their order in the default plugin
list is preserved.  Plugins not found in that list are ordered
alphabetically before other plugins with the same priority.
man/strongswan.conf.5.in
src/libstrongswan/plugins/plugin_loader.c
src/libstrongswan/plugins/plugin_loader.h