asiolink::IOAddress addr, uint8_t len) {
// Subnet ID is optional. If it is not supplied the value of 0 is used,
// which means autogenerate.
- SubnetID subnet_id = static_cast<SubnetID>(getInteger(params, "id"));
+ SubnetID subnet_id = 0;
+ if (params->contains("id")) {
+ subnet_id = static_cast<SubnetID>(getInteger(params, "id"));
+ }
Subnet4Ptr subnet4(new Subnet4(addr, len, Triplet<uint32_t>(),
Triplet<uint32_t>(), Triplet<uint32_t>(),
asiolink::IOAddress addr, uint8_t len) {
// Subnet ID is optional. If it is not supplied the value of 0 is used,
// which means autogenerate.
- SubnetID subnet_id = static_cast<SubnetID>(getInteger(params, "id"));
+ SubnetID subnet_id = 0;
+ if (params->contains("id")) {
+ subnet_id = static_cast<SubnetID>(getInteger(params, "id"));
+ }
// We want to log whether rapid-commit is enabled, so we get this
// before the actual subnet creation.