Skip to content

Commit 613a42a

Browse files
committed
allow module .so's to be symbolic links
1 parent 03dab10 commit 613a42a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

core/bessd.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,12 @@ bool LoadPlugins(const std::string &directory) {
443443
}
444444
dirent *entry;
445445
while ((entry = readdir(dir)) != nullptr) {
446-
if (entry->d_type == DT_REG && HasSuffix(entry->d_name, ".so")) {
446+
if ((entry->d_type == DT_REG || entry->d_type == DT_LNK)
447+
&& HasSuffix(entry->d_name, ".so")) {
447448
const std::string full_path = directory + "/" + entry->d_name;
449+
LOG(INFO) << "Loading plugin: " << full_path;
448450
if (!LoadPlugin(full_path)) {
451+
LOG(WARNING) << "Cannot load plugin " << full_path << "dlerror=" << dlerror();
449452
closedir(dir);
450453
return false;
451454
}

0 commit comments

Comments
 (0)