mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-11 04:57:00 +00:00
![]() `lcommunity_gettoken` expects a space-delimeted list of 0 or more large communities. `lcommunity_list_valid` can perform this check. `lcommunity_list_valid` now validates large community lists more accurately based on the following condition: Each quantity in a standard bgp large community must: 1. Contain at least one digit 2. Fit within 4 octets 3. Contain only digits unless the lcommunity is "expanded" 4. Contain a valid regex if the lcommunity is "expanded" Moreover we validate that each large community list contains exactly 3 such values separated by a single colon each. One quirk of our validation which is worth documenting is: ``` bgp large-community-list standard test2 permit 1:c:3 bgp large-community-list expanded test1 permit 1:c:3 ``` The first line will throw an error complaining about a "malformed community-list value". The second line will be accepted because the each value is each treated as a regex when matching large communities, it simply will never match anything so it's rather useless. Signed-off-by: Wesley Coakley <wcoakley@nvidia.com> |
||
---|---|---|
.. | ||
__init__.py | ||
bgp_large_community_topo_1.json | ||
bgp_large_community_topo_2.json | ||
test_bgp_large_community_topo_1.py | ||
test_bgp_large_community_topo_2.py |