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

mod_asn (or rather postgresql-ip4r) incompatible with IPv6 #58

poeml opened this issue Jun 5, 2015 · 0 comments

mod_asn (or rather postgresql-ip4r) incompatible with IPv6 #58

poeml opened this issue Jun 5, 2015 · 0 comments


Copy link

poeml commented Jun 5, 2015

                                                                                     [          ]

Issue migrated (2015-06-05) from old issue tracker

Title    mod_asn (or rather postgresql-ip4r) incompatible with IPv6
 Priority   urgent                      Status           resolved
Superseder                            Nosy List          poeml
Assigned To poeml                      Keywords          mod_asn

msg213 (view) Author: poeml Date: 2010-09-05.17:20:34

When I once used mod_asn on a host with IPv6 connectivity, I ran into a problem
with the PostgreSQL database server eating memory. The ip4r data type, implanted
throuth the postgresl-ip4r contrib extension, is IPv4 only, and I believe that it
has a bug when it gets queries with IPv6 addresses. What happened was that the
server ran fine for some time, but after a while it complained about an out of
memory situation. The kind of memory that it claimed to have ran out of was not
clearly identifiable; the error message didn't seem to make sense to me 100%.

Since the ASN database is Ipv4-only, I will commit a fix to mod_asn that will stop
it to send IPv6 addresses to the database. That should avoid the issue.

The issue should be (reported and) debugged separately with postgresql-ip4r. Also,
ways to extend postgresql-ip4r for Ipv6 would be interesting to discuss. Finally,
there might be an ASN database for IPv6 addresses in the future; and 32-bit AS
numbers are also coming soon (which is another change). 32-bit AS will supercede
(or supplement, first) the current 16-bit AS numbers.

msg214 (view) Author: poeml Date: 2010-09-05.17:57:15

Fix committed in r84.

I'm preparing a release (1.5).

msg216 (view) Author: poeml Date: 2010-09-05.19:11:28

Here's the problem's symptom on the Apache side:

[Fri Sep 03 16:12:51 2010] [notice] [client 2002:8cba:4668::1] [mod_asn] IP
2002:8cba:4668::1 not found
[Fri Sep 03 16:12:51 2010] [error] [client 2002:8cba:4668::1] [mod_mirrorbrain] could
not resolve country
[Fri Sep 03 16:12:51 2010] [error] [client 2002:8cba:4668::1] [mod_mirrorbrain] could
not resolve continent
[Fri Sep 03 16:52:27 2010] errorInternal error: DBD: failed to initialise
[Fri Sep 03 16:52:27 2010] [error] [client] [mod_asn] Error acquiring
database connection

         Date         User  Action              Args
2010-09-05 19:11:44 poeml set    status: in-progress -> resolved
2010-09-05 19:11:29 poeml set    messages: + msg216
2010-09-05 17:57:15 poeml set    messages: + msg214
2010-09-05 17:20:34 poeml create

(end of migrated issue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant