You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was testing with the lastest docker image and uploading an OSPF LSDB. The uploading works for an IOS-XR LSDB but when I am testing the output from a Cisco IOS LSDB it trows an internal server error. The Flask logs show the following error:
[2021-08-04 08:54:41 +0000] [13] [ERROR] Error handling request /upload-ospf-lsdb
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 134, in handle
self.handle_request(listener, req, client, addr)
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 175, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/usr/local/lib/python3.6/site-packages/connexion/apps/abstract.py", line 249, in __call__
return self.app(environ, start_response)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2464, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "routes.pyx", line 2063, in routes.upload_file
File "Helpers.pyx", line 1883, in Helpers.ParsingHelper.doParseLsdbAndBuildGraph
File "Helpers.pyx", line 1274, in Helpers.ParsingHelper.parse_router_lsa
File "/usr/local/lib/python3.6/ipaddress.py", line 1519, in __init__
raise ValueError('%s has host bits set' % self)
ValueError: x.x.x.x/31 has host bits set
The IP address has obiously been obfuscated.
When I check the LSDB output the IP address mentioned in the error is part of a type 1 router LSA. It is first part of a /31 point to point link and also mentioned als a stub network.
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: x.x.x.x
(Link Data) Router Interface address: x.x.x.x <== IP address with the /31 mask mentioned in the error
Number of MTID metrics: 0
TOS 0 Metrics: 1
Link connected to: a Stub Network
(Link ID) Network/subnet number: x.x.x.x <== IP address with the /31 mask mentioned in the error
(Link Data) Network Mask: 255.255.255.254
Number of MTID metrics: 0
TOS 0 Metrics: 1
The Python IP address library is throwing this error because the address mentioned is not the network address it seems, though with a /31 you won't have a dedicated network address. In my case it is the second address in the /31.
I can't check the code to see why and how the IP address is being checked by the ipaddress module so I can't speculate on how to solve it. Would you be willing to add the code to this repository so others might help solving this issue?
The text was updated successfully, but these errors were encountered:
Hi @rbeumer, thank you for your feedback and for such deep investigation. I met cases when OSPF use non-network addresses and probably my implemented logic doesn't cover all cases) I will try to recreate the issue, fix, release it next week.
I was testing with the lastest docker image and uploading an OSPF LSDB. The uploading works for an IOS-XR LSDB but when I am testing the output from a Cisco IOS LSDB it trows an internal server error. The Flask logs show the following error:
The IP address has obiously been obfuscated.
When I check the LSDB output the IP address mentioned in the error is part of a type 1 router LSA. It is first part of a /31 point to point link and also mentioned als a stub network.
The Python IP address library is throwing this error because the address mentioned is not the network address it seems, though with a /31 you won't have a dedicated network address. In my case it is the second address in the /31.
I can't check the code to see why and how the IP address is being checked by the ipaddress module so I can't speculate on how to solve it. Would you be willing to add the code to this repository so others might help solving this issue?
The text was updated successfully, but these errors were encountered: