Subnet parser can be confused by repeating the same parameter
Our subnet parser will accept the following construct:
"subnet4": [
{
"subnet": "192.1.0.0/16",
"pools": [ { "pool": "192.1.1.0 - 192.1.255.254" } ],
"option-data": [
{
"name": "routers",
"data": "192.0.2.1"
}
],
"subnet": "192.2.3.0/24",
"pools": [ { "pool": "192.2.3.1 - 192.2.3.200" } ]
}
],
To clarify.... this is a single subnet definition which contains two occurrences of the subnet
(prefix) and pools
. It may contain more repeated parameters, e.g. relay, interface etc. The later occurrences of each parameter will override the earlier occurrences. In theory, this is a misconfiguration and nobody should attempt it. The reality is that users sometimes make copy-paste errors and may not notice the problem. The end result is that the user would expect having two subnets while effectively he'd get just one, because all parameters are overriden.