Skip to content

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

@terjekv

Description

@terjekv

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"}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions