Skip to content

[Tool #108] CIDR Calculator does not recalculate results when the CIDR input changes #371

Description

@baixiangcpp

Summary

CIDR / Subnet Calculator keeps the previous calculation after the CIDR input is replaced. Copy also returns the old calculation instead of the current input.

Affected tool: CIDR / Subnet Calculator
Route: https://byteflow.tools/en/cidr-calculator
Observed during browser acceptance: 2026-08-18

Reproduction

  1. Open the affected route with the initial value:
192.168.1.42/24
  1. Confirm that the result and Copy output describe the initial network.
  2. Replace the input with:
10.42.8.0/22
  1. Inspect the result fields.
  2. Click Copy and inspect the copied text.

Actual output

The input field shows 10.42.8.0/22, but the result and copied output still describe the old 192.168.1.42/24 calculation. The result is not recomputed from the current input.

Expected output

Changing the input should recalculate every derived field and Copy should use the new calculation. For 10.42.8.0/22, the network should be 10.42.8.0/22, the broadcast should be 10.42.11.255, and the usable host range should be 10.42.8.1 through 10.42.11.254, subject to the exact fields exposed by the tool.

Impact

Users can copy a subnet calculation for a previous network while the visible input shows a different network.

Regression coverage

Change between multiple valid CIDRs, including different prefix lengths, and assert that every displayed field and copied result updates to the latest input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions