Closed Edrichdelange closed 4 years ago
hm, irrdb_asn.asn
is defined as INT where it should be UNSIGNED INT.
Thanks for the detailed bug report @Edrichdelange - it certainly made finding, testing, fixing, testing the fix very easy.
For a quick fix, run the following SQL:
ALTER TABLE irrdb_asn CHANGE asn asn INT UNSIGNED NOT NULL
Doing this now without waiting for a release should not cause any issues later.
ISSUE TYPE
Bug Report
OS
VERSION
ENVIRONMENT
CONFIGURATION
SUMMARY
We noticed because HE had a bogus ASN in their IRR, which was longer than ixpmanager expected, our IRR updates were failing with An exception occurred while executing 'INSERT INTO
irrdb_asn
( customer_id, asn, protocol, last_seen, first_seen ) VALUES ( ?, ?, ?, ?, ? )' with params [56, 3741437414, 4, "2020-08-04 17:34:42", "2020-08-04 17:34:42"]:Even though its a boon at the moment, this could be a valid asn in the future as it is smaller than 4294967295, which is the last 32 bit ASN
STEPS TO REPRODUCE
Have HE as a peer, with their ASSet, run ./artisan irrdb:update-asn-db 6939
EXPECTED RESULTS
For it to not fail, or to avoid the bad ASN
ACTUAL RESULTS
root@portal:/srv/ixpmanager# ./artisan irrdb:update-asn-db 6939
In AbstractMySQLDriver.php line 106:
An exception occurred while executing 'INSERT INTO
irrdb_asn
( customer_id, asn, protocol, last_seen, first_seen ) VALUES ( ?, ?, ?, ?, ? )' with params [56, 3741437414, 4, "2020-08-04 17:34:42", "2020-08-04 17:34:42"]:SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'asn' at row 1
In PDOStatement.php line 129:
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'asn' at row 1
In PDOStatement.php line 127:
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'asn' at row 1
IMPORTANCE
Yes, Im assuming this is blocking the filter updates for HE.net
RELEVANT LOGS