summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vlib/unix/plugin.c10
-rw-r--r--src/vlib/unix/plugin.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/vlib/unix/plugin.c b/src/vlib/unix/plugin.c
index a1df3b24b66..b4eb0b92fb4 100644
--- a/src/vlib/unix/plugin.c
+++ b/src/vlib/unix/plugin.c
@@ -94,6 +94,9 @@ load_one_plugin (plugin_main_t * pm, plugin_info_t * pi, int from_early_init)
goto error;
}
+ if (pm->plugins_default_disable)
+ reg->default_disabled = 1;
+
p = hash_get_mem (pm->config_index_by_name, pi->name);
if (p)
{
@@ -517,6 +520,13 @@ done:
pm->vat_plugin_path = s;
else if (unformat (input, "vat-name-filter %s", &s))
pm->vat_plugin_name_filter = s;
+ else if (unformat (input, "plugin default %U",
+ unformat_vlib_cli_sub_input, &sub_input))
+ {
+ pm->plugins_default_disable =
+ unformat (&sub_input, "disable") ? 1 : 0;
+ unformat_free (&sub_input);
+ }
else if (unformat (input, "plugin %s %U", &s,
unformat_vlib_cli_sub_input, &sub_input))
{
diff --git a/src/vlib/unix/plugin.h b/src/vlib/unix/plugin.h
index aad1ca30b3c..2a238279401 100644
--- a/src/vlib/unix/plugin.h
+++ b/src/vlib/unix/plugin.h
@@ -97,6 +97,7 @@ typedef struct
u8 *plugin_name_filter;
u8 *vat_plugin_path;
u8 *vat_plugin_name_filter;
+ u8 plugins_default_disable;
/* plugin configs and hash by name */
plugin_config_t *configs;