summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/subnet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/dhcpsrv/subnet.h')
-rw-r--r--src/lib/dhcpsrv/subnet.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/dhcpsrv/subnet.h b/src/lib/dhcpsrv/subnet.h
index 176e3dbb43..140a521bf6 100644
--- a/src/lib/dhcpsrv/subnet.h
+++ b/src/lib/dhcpsrv/subnet.h
@@ -315,6 +315,10 @@ protected:
///
/// @return the next unique Subnet-ID
static SubnetID generateNextID() {
+ if (static_id_ == SUBNET_ID_MAX) {
+ resetSubnetID();
+ }
+
return (static_id_++);
}