bgpkit-parser
bgpkit-parser copied to clipboard
[issue] fix community value representations
Currently, LargeCommunity's string representation has an extra lg: prefix which is not conforming with RFC8092's definiton.
The canonical representation of BGP Large Communities is three separate unsigned integers in decimal notation in the following order: Global Administrator, Local Data 1, Local Data 2. Numbers MUST NOT contain leading zeros; a zero value MUST be represented with a single zero. Each number is separated from the next by a single colon. For example: 64496:4294967295:2, 64496:0:0.
We should also check extended community RFCs to make sure we do string representation correctly for them as well:
Complete IANA assignment here: https://www.iana.org/assignments/bgp-extended-communities/bgp-extended-communities.xml