From 2155bca51ab68ee05e3ec4c4e1d8837426e9b8ba Mon Sep 17 00:00:00 2001 From: Roi Dayan Date: Sun, 18 Aug 2024 14:03:35 +0300 Subject: [PATCH] fixup! WIP: plugable dpif. --- lib/dpif-plugin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dpif-plugin.c b/lib/dpif-plugin.c index d10b5314c3a..6bd1d26d0f0 100644 --- a/lib/dpif-plugin.c +++ b/lib/dpif-plugin.c @@ -43,7 +43,7 @@ any_plugin_get(const char *prefix, const char *str) } snprintf(buf, sizeof(buf), "%s-%s.so", prefix, str); - dlh = dlopen(buf, RTLD_NOW); + dlh = dlopen(buf, RTLD_LAZY); if (!dlh) { /* look in current binary, only open once */ dlh = BODY; @@ -54,6 +54,7 @@ any_plugin_get(const char *prefix, const char *str) } } VLOG_INFO("Loaded plugin '%s-%s'", prefix, str); + dlerror(); /* Clear any existing error */ snprintf(buf, sizeof(buf), "%s_%s_plugin", prefix, str); p = dlsym(dlh, buf);