aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/unix/plugin.c9
-rw-r--r--src/vlib/unix/plugin.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/src/vlib/unix/plugin.c b/src/vlib/unix/plugin.c
index 4a7ff2753f2..891e2cb642d 100644
--- a/src/vlib/unix/plugin.c
+++ b/src/vlib/unix/plugin.c
@@ -594,7 +594,12 @@ vlib_plugin_early_init (vlib_main_t * vm)
0x7FFFFFFF /* aka no rate limit */ );
if (pm->plugin_path == 0)
- pm->plugin_path = format (0, "%s%c", vlib_plugin_path, 0);
+ pm->plugin_path = format (0, "%s", vlib_plugin_path);
+
+ if (pm->plugin_path_add)
+ pm->plugin_path = format (pm->plugin_path, ":%s", pm->plugin_path_add);
+
+ pm->plugin_path = format (pm->plugin_path, "%c", 0);
PLUGIN_LOG_DBG ("plugin path %s", pm->plugin_path);
@@ -756,6 +761,8 @@ done:
u8 *s = 0;
if (unformat (input, "path %s", &s))
pm->plugin_path = s;
+ else if (unformat (input, "add-path %s", &s))
+ pm->plugin_path_add = s;
else if (unformat (input, "name-filter %s", &s))
pm->plugin_name_filter = s;
else if (unformat (input, "vat-path %s", &s))
diff --git a/src/vlib/unix/plugin.h b/src/vlib/unix/plugin.h
index e3555fe3ba9..1c46e6b196c 100644
--- a/src/vlib/unix/plugin.h
+++ b/src/vlib/unix/plugin.h
@@ -123,6 +123,7 @@ typedef struct
/* paths and name filters */
u8 *plugin_path;
+ u8 *plugin_path_add;
u8 *plugin_name_filter;
u8 *vat_plugin_path;
u8 *vat_plugin_name_filter;