FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.35k stars 1.26k forks source link

bgp community alias caused routemap set community errors #10998

Closed lifenwu closed 2 years ago

lifenwu commented 2 years ago

bgp community alias caused routemap set community errors

[ ] Did you check if this is a duplicate issue? [ ] Did you test it on the latest FRRouting/frr master branch?

To Reproduce """ 977c7467ab48# configure 977c7467ab48(config)# bgp community alias 1:11 ca_test 977c7467ab48(config)# route-map rm_test_1 permit 10 977c7467ab48(config-route-map)# set community 1:11 % [BGP] Argument form is unsupported or malformed. 977c7467ab48(config-route-map)# route-map rm_test_2 permit 10 977c7467ab48(config-route-map)# set community ca_test % Malformed communities attribute 977c7467ab48(config-route-map)# no bgp community alias 1:11 ca_test 977c7467ab48(config)# route-map rm_test_1 permit 10 977c7467ab48(config-route-map)# set community 1:11 977c7467ab48(config-route-map)# end """

Expected behavior

Screenshots

Versions 977c7467ab48# show version FRRouting 8.3-dev-my-manual-build (977c7467ab48) on Linux(5.4.0-1074-azure). Copyright 1996-2005 Kunihiro Ishiguro, et al. configured with: '--prefix=/usr' '--localstatedir=/var/run/frr' '--sbindir=/usr/lib/frr' '--sysconfdir=/etc/frr' '--enable-vtysh' '--enable-pimd' '--enable-sharpd' '--enable-multipath=64' '--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty' '--enable-snmp=agentx' '--enable-scripting' '--with-pkg-extra-version=-my-manual-build'

Additional context

ton31337 commented 2 years ago

@lifenwu can you test this branch? https://github.com/FRRouting/frr/pull/10999

lifenwu commented 2 years ago

It fixed "% [BGP] Argument form is unsupported or malformed." to allow numeric pattern. But alias still cannot be used in set community. e09377f09c5b# configure e09377f09c5b(config)# bgp community alias 1:11 ca_test e09377f09c5b(config)# route-map rm_test_1 permit 10 e09377f09c5b(config-route-map)# set community 1:11 e09377f09c5b(config-route-map)# route-map rm_test_2 permit 10 e09377f09c5b(config-route-map)# set community ca_test % Malformed communities attribute 'ca_test' e09377f09c5b(config-route-map)# no bgp community alias 1:11 ca_test e09377f09c5b(config)# route-map rm_test_1 permit 10 e09377f09c5b(config-route-map)# set community 1:11 e09377f09c5b(config-route-map)# end

ton31337 commented 2 years ago

@lifenwu it's not allowed to enter set community <alias>. We have match alias <alias>. We might add this as a separate feature request for set operation.

lifenwu commented 2 years ago

ok. thx.