Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the networks endpoint with the wrong netmask may give 500 errors. #516

Open
terjekv opened this issue Aug 30, 2023 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@terjekv
Copy link
Collaborator

terjekv commented Aug 30, 2023

This is not ideal. Assume 172.16.20.0/22 exists:

$ curl -s -H "Authorization: Token $(cat ~/.mreg-cli_auth_token  | cut -d "¤" -f2)" 'https://.../api/v1/networks/172.16.20.0%2f20/used_host_list'

<!doctype html>
<html lang="en">
<head>
  <title>Server Error (500)</title>
</head>
<body>
  <h1>Server Error (500)</h1><p></p>
</body>
</html>
curl -v -s -H "Authorization: Token $(cat ~/.mreg-cli_auth_token  | cut -d "¤" -f2)" 'https://.../api/v1/networks/172.16.20.0%2f22/used_host_list'
{"172.16.20.1", "gateway"}
@terjekv terjekv self-assigned this Aug 30, 2023
@terjekv terjekv added the bug Something isn't working label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant