Skip to content

Support GeoLite2 countryinfo data, use Text::CSV#2

Open
cgull wants to merge 6 commits into
mschmitt:masterfrom
cgull:speedup2
Open

Support GeoLite2 countryinfo data, use Text::CSV#2
cgull wants to merge 6 commits into
mschmitt:masterfrom
cgull:speedup2

Conversation

@cgull

@cgull cgull commented Jan 24, 2019

Copy link
Copy Markdown

Here's a new PR with some further development. I think it fixes all the issues in #1, and a bug with GeoLite2 countryinfo parsing. I hadn't realized that parsing concatenated IPv4/IPv6 input was the way it's used for xtables, or that contrib/Makefile did that. There's also a commit to use Text::CSV for output, but that doesn't seem useful since we always quote all output values anyway, and it slows the script down slightly.

@mschmitt: if you take any/all of this, would you take entire commits, or ask me to refactor/improve them for you? After you took part of #1, it was somewhat painful to edit/rebase the rest of my work onto your new commit. It would have been much easier for me to split the commit myself and give it to you.

Also noted: I'm not sure what contrib/Makefile is there for, but it wasn't very useful for testing for me. It requires Linux, root access, and installed xtables and xtables geoIP data. It took a while to work this out, I'm using FreeBSD and iptables/xtables doesn't even exist there.

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

Successfully merging this pull request may close these issues.

1 participant