plugins/host-local: ensure subnet is a network address

Allocation code assumes the specified subnet is a clean network address
prefix, so check that is the case and throw an error otherwise

Fixes #161
This commit is contained in:
Neil Wilson
2018-06-18 10:13:34 +01:00
parent 1f6e6ef198
commit b2fc336833
4 changed files with 54 additions and 12 deletions

View File

@ -444,7 +444,7 @@ var _ = Describe("host-local Operations", func() {
"dataDir": "%s",
"ranges": [
[{"subnet":"172.16.1.0/24"}, { "subnet": "10.1.2.0/24" }],
[{ "subnet": "2001:db8:1::/24" }]
[{ "subnet": "2001:db8:1::/48" }]
]
},
"args": {