Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bgpd: fix route-target display with as dotted format
The following command results in a wrong route-target display: > # show running-config > [..] > route-map rmap permit 1 > set ext-community rt 1.45:55 > exit > router bgp 65500 > neighbor 1.1.1.1 remote-as 65500 > address-family ipv4 unicast > neighbor 1.1.1.1 route-map rmap in > Observed output: > # show bgp ipv4 3.3.3.3/32 > [..] > Extended Community: RT:1.0.0.45:55 > The decoding of the passed cli string assumes this is an IP address, whereas it is an AS number in dotted format. Consequently, the vty output will use the ip address encoding. Count the number of dots in the extended community format. If a single dot number is detected, the AS format is passed, and used by the vty output. Expected output: > > # show bgp ipv4 3.3.3.3/32 > [..] > Extended Community: RT:65581:55:55 > Signed-off-by: Philippe Guibert <[email protected]>
- Loading branch information