Update IP reservation logic to include 'reserved' status in available IPs

This commit is contained in:
baodev0
2026-07-13 12:08:42 +07:00
parent 3403cb9ec5
commit fdb5714e93
@@ -304,9 +304,7 @@ class AssignIpToGuestJob implements ShouldQueue
->toArray();
$ipPool = IpPool::where('module_network_id', $networkId)
->where('status', 'free')
->whereNotNull('gateway')
->where('gateway', '!=', '')
->whereIn('status', ['free', 'reserved'])
->whereNotIn('ip_address', $usedIps)
->lockForUpdate()
->inRandomOrder()