summaryrefslogtreecommitdiff
path: root/libpod/network/netconflist.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/network/netconflist.go')
-rw-r--r--libpod/network/netconflist.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/libpod/network/netconflist.go b/libpod/network/netconflist.go
index a5fec5e80..d61b96ecb 100644
--- a/libpod/network/netconflist.go
+++ b/libpod/network/netconflist.go
@@ -230,8 +230,16 @@ func IfPassesFilter(netconf *libcni.NetworkConfigList, filters map[string][]stri
}
}
+ case "id":
+ // matches part of one id
+ for _, filterValue := range filterValues {
+ if strings.Contains(GetNetworkID(netconf.Name), filterValue) {
+ result = true
+ break
+ }
+ }
+
// TODO: add dangling filter
- // TODO TODO: add id filter if we support ids
default:
return false, errors.Errorf("invalid filter %q", key)