[BUG] Address Subnet CIDR caclulation bug #1077

Closed
opened 2026-04-05 18:14:27 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jackrosenberg on 8/12/2025

When creating a new site via the API, the calculation for CIDR range appears to be going wrong.

curl -X 'PUT' \
  'https://api.DASHBOARDl/v1/org/test/site' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer ADMIN_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "test_site",
  "exitNodeId": 1,
  "pubKey": "this.is.the.public.key",
  "subnet": "100.90.128.0/24",
  "newtId": "this.is.the.newt.id",
  "secret": "1234567890",
  "address": "100.90.128.0",
  "type": "newt"
}'

gives:

{
  "data": null,
  "success": false,
  "error": true,
  "message": "IP is not in the CIDR range of the subnet.",
  "status": 400,
  "stack": null
}
*Originally created by @jackrosenberg on 8/12/2025* When creating a new site via the API, the calculation for CIDR range appears to be going wrong. ``` curl -X 'PUT' \ 'https://api.DASHBOARDl/v1/org/test/site' \ -H 'accept: */*' \ -H 'Authorization: Bearer ADMIN_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "test_site", "exitNodeId": 1, "pubKey": "this.is.the.public.key", "subnet": "100.90.128.0/24", "newtId": "this.is.the.newt.id", "secret": "1234567890", "address": "100.90.128.0", "type": "newt" }' ``` gives: ``` { "data": null, "success": false, "error": true, "message": "IP is not in the CIDR range of the subnet.", "status": 400, "stack": null } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#1077