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

Imported LIR entries have overlapping ranges #52

Open
kloesing opened this issue Dec 4, 2012 · 2 comments
Open

Imported LIR entries have overlapping ranges #52

kloesing opened this issue Dec 4, 2012 · 2 comments

Comments

@kloesing
Copy link
Contributor

kloesing commented Dec 4, 2012

Some LIR assignment ranges have overlapping ranges, but the lookup code assumes that is not the case. For example:

sqlite> SELECT * FROM assignments WHERE start_hex >= '080000000' ORDER BY start_hex LIMIT 10;
080000000|081000000|ipv4|EU # Country is really world wide|lir|ripencc
080000000|080000800|ipv4|RO|lir|ripencc
080000000|080000100|ipv4|ro|lir|ripencc
080000000|080000800|ipv4|RO|rir|ripencc
[...]

Now, if we look up IPv4 address 128.0.0.0 (note that hex 080000000 is 9 chars long, so this is hex 0 80 00 00 00), we get:

~/src/blockfinder$ ./blockfinder -4 128.0.0.0
Your cached RIR files are older than 24 hours; you probably want to update them.
Reverse lookup for: 128.0.0.0
RIR country code: RO
LIR country code: EU # Country field is actually all countries in the world and not just EU countries

I think we have 2 options here. Either we clean up the input data somehow, so that there are no overlapping assignment ranges, or we output all matching assignment ranges and the user figures out herself what that means. I slightly lean towards the second option, but mostly because I have no idea how to clean up the input data.

@ioerror
Copy link
Owner

ioerror commented Apr 11, 2013

I think the second option is reasonable.

@kloesing
Copy link
Contributor Author

Okay. I'm afraid I won't be able to hack on this for a while. If someone else wants to write this patch in the meantime, please do so.

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

2 participants