tickets #62678
closedpontifex - mirrorbrain - routeviews - ip4r does not support ipv6 addresses.
100%
Description
Every day we download two snapshots from mirrorbrain.org with ipv4 and ipv6 route information. These are loaded into table "pfx2asn". Unfortunately, the 'pfx^ column is of type 'ip4r' which only accepts ipv4 ranges.
When the daily job reports:
Downloading http://mirrorbrain.org/routeviews/oix-full-snapshot-latest.dat.bz2
nothing imported, no change comitted to the database
That is really a problem - it means our pfx2asn table was NOT updated, but it should ALWAYS be updated.
Traceback (most recent call last):
File "/tmp/asn_imp2", line 95, in
import_raw()
File "/tmp/asn_imp2", line 74, in import_raw
cursor.execute("INSERT INTO %s VALUES ( %%s, %%s )" % tablename, [pfx, asn])
psycopg2.DataError: invalid IP4R value: "2001::/32"
LINE 1: INSERT INTO pfx2asn VALUES ( '2001::/32', 1101 )
Therefore, the import fails and ALL the changes are rolled back.
I am wondering if maybe asn_get_routeview and asn_import were updated (in apache2-mod_asn-tools) without our database being updated?
I hesitate suggesting changing the column type to 'iprange' which accepts both ipv4 and ipv6 ranges, I have no idea what it might affect.