Merge pull request #860 from steveeJ/podenv-usernets-parse

networking: load only *.conf files
This commit is contained in:
Alban Crequy
2015-05-20 10:19:11 +02:00

View File

@@ -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