Skip to content

Commit e96fb57

Browse files
authored
Merge pull request #605 from aristanetworks/arista-module-symlinks
allow module .so's to be symbolic links
2 parents 57497af + 613a42a commit e96fb57

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)