-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[Bug?] Error when browsing IP addresses from a prefix page #460
Comments
Can you provide a list of the IPs defined in that prefix? You can try looking through the admin UI, or run
|
Hi Jeremy, The shell returned : |
What's the parent prefix? 10.59.218.128/27? |
Parent is 10.59.218.128/26 |
This bug seems to occur when you have one or more IPs define with differing mask lengths. Try searching for all IPs within the /26 ( The error triggers because the IPs with larger masks are sorted before those with smaller masks. Not sure why that is, but I'll dig into it. In the interim, you should be able to work around it by adjusting the mask for all IPs in the prefix to match. Also, the query I gave you above is incorrect. It should have been the following (which will include any /26 IPs):
|
Thanks Jeremy, looks like I got sucked in by excel's fill down function auto-incrementing and missed it when I bulk imported from yes our current excel sheets. Swapped them to the /26 mask and the steps to cause the error longer result in an error and work as expected. |
So, after casting an IP address using |
…iffering prefix lengths
If I search for an IP from the search box on the front page, then select its parent prefix and select the IP address tab I get an error thrown. Outside valid IP address boundary! I have just upgraded to v1.5.1 directly from v1.4.0 Traceback is below.
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py" in inner
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _legacy_get_response
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response
File "/opt/netbox-1.5.1/netbox/ipam/views.py" in prefix_ipaddresses
File "/opt/netbox-1.5.1/netbox/ipam/views.py" in add_available_ipaddresses
File "/usr/local/lib/python2.7/dist-packages/netaddr/ip/init.py" in sub
File "/usr/local/lib/python2.7/dist-packages/netaddr/ip/init.py" in rsub
Exception Type: IndexError at /ipam/prefixes/1/ip-addresses/
Exception Value: result outside valid IP address boundary!
The text was updated successfully, but these errors were encountered: