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

@ -372,7 +372,7 @@ var _ = Describe("IPAM config", func() {
"type": "host-local",
"ranges": [
[{"subnet": "10.1.2.0/24"}],
[{"subnet": "2001:db8:1::/24"}]
[{"subnet": "2001:db8:1::/48"}]
]
}
}`