Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Look for network plugin using name as path #1950

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions networking/net_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ func (e *podEnv) pluginPaths() []string {
}

func (e *podEnv) findNetPlugin(plugin string) string {
// try to find the plugin directly first
if fi, err := os.Stat(plugin); err == nil && fi.Mode().IsRegular() {
return plugin
}

for _, p := range e.pluginPaths() {
fullname := filepath.Join(p, plugin)
if fi, err := os.Stat(fullname); err == nil && fi.Mode().IsRegular() {
Expand Down