Skip to content

Unable to insert IPv6 default route #5

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

Open
sbng opened this issue Apr 1, 2024 · 0 comments
Open

Unable to insert IPv6 default route #5

sbng opened this issue Apr 1, 2024 · 0 comments

Comments

@sbng
Copy link

sbng commented Apr 1, 2024

Unable to insert IPv6 default route. However, no issue with IPv4 default route.

 ...: from mmdb_writer import MMDBWriter
  ...: from netaddr import IPSet, IPNetwork
  ...:
  ...:
  ...: writer = MMDBWriter( ip_version=6, ipv4_compatible=True)
  ...: writer.insert_network( IPSet(IPNetwork("0.0.0.0/0")), { "autonomous_system_number": 123, "autonomous_system_organization": "test"},)
  ...: writer.insert_network( IPSet(IPNetwork("::/0")), { "autonomous_system_number": 123, "autonomous_system_organization": "test"},)
  ...:
  ...:
  ...:
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
Cell In[2], line 9
     7 writer = MMDBWriter( ip_version=6, ipv4_compatible=True)
     8 writer.insert_network( IPSet(IPNetwork("0.0.0.0/0")), { "autonomous_system_number": 123, "autonomous_system_organization": "test"},)
----> 9 writer.insert_network( IPSet(IPNetwork("::/0")), { "autonomous_system_number": 123, "autonomous_system_organization": "test"},)

File ~/.local/lib/python3.12/site-packages/mmdb_writer.py:446, in MMDBWriter.insert_network(self, network, content)
   444         # Insert supernet information on each inverse bit of the current subnet
   445         current_node[1 - next_bit] = supernet_leaf
--> 446 current_node[bits[-1]] = leaf

IndexError: list index out of range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant