netns: add range check for netns ids

This commit is contained in:
Erik Arvstedt 2020-08-21 22:35:54 +02:00
parent 74f1610668
commit 5a81693ef3
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
1 changed files with 3 additions and 4 deletions

View File

@ -53,12 +53,11 @@ in {
type = types.attrsOf (types.submodule {
options = {
id = mkOption {
# TODO: Exclude 10
# TODO: Assert uniqueness
type = types.int;
type = types.ints.between 11 255;
description = ''
id for the netns, that is used for the IP address host part and
naming the interfaces. Must be unique. Must not be 10.
id for the netns, used for the IP address host part and
for naming the interfaces. Must be unique. Must be greater than 10.
'';
};
connections = mkOption {