Skip to content

Postgres does not accept private AS numbers #2712

Description

@sebix

Shadowserver example data uses AS number like 4200393735

https://www.arin.net/resources/guide/asn/

There are two different formats to represent ASNs: 2-byte and 4-byte.

A 2-byte ASN is a 16-bit number. This format provides for 65,536 ASNs (0 to 65535). From these ASNs, the Internet Assigned Numbers Authority (IANA) reserved 1,023 of them (64512 to 65534) for private use.

A 4-byte ASN is a 32-bit number. This format provides for 232 or 4,294,967,296 ASNs (0 to 4294967295). IANA reserved a block of 94,967,295 ASNs (4200000000 to 4294967294) for private use.

The postgres type for source.asn/destination.asn is currently integer:
https://github.com/certtools/intelmq/blob/develop/intelmq/tests/bin/initdb.sql#L20

That does not allow such high numbers and leads to this error:

psycopg2.errors.NumericValueOutOfRange: integer out of range

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    data-formatgood first issueIndicates a good issue for first-time contributorshelp wantedIndicates that a maintainer wants help on an issue or pull request

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions