mirror of
https://github.com/clearlinux/rkt.git
synced 2026-04-28 10:53:55 +00:00
Merge pull request #860 from steveeJ/podenv-usernets-parse
networking: load only *.conf files
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
"path"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/cni/pkg/plugin"
|
||||
"github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/spec/schema/types"
|
||||
@@ -218,6 +219,11 @@ func loadUserNets() ([]activeNet, error) {
|
||||
|
||||
for _, filename := range files {
|
||||
filepath := path.Join(UserNetPath, filename)
|
||||
|
||||
if !strings.HasSuffix(filepath, ".conf") {
|
||||
continue
|
||||
}
|
||||
|
||||
n, err := loadNet(filepath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user