]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_vty.c
bgpd: store the bgp as identifier in the configured as-notation
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 15 Nov 2022 15:42:40 +0000 (16:42 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 10 Feb 2023 09:19:06 +0000 (10:19 +0100)
commit9eb11997104e3ba5e436220f758f7881c0c0556d
tree5b23e2116716f4fa7368312c3f8582f2de010bc6
parent0e7864be7b3be61e3f8f397145acc2de017871e3
bgpd: store the bgp as identifier in the configured as-notation

This is a preliminary work to handle various ways to configure
a BGP Autonomous System. When creating a BGP instance, the
user may want to define the AS number as a dotted value,
instead of using an integer value.

To handle both cases, an as_pretty char attribute will store
the as number as it has been given to the vtysh command:

router bgp <as number>

Whenever the as integer of the BGP instance was dumped,
the as_pretty original format is used.

The json output reuses the integer value to keep backward
compatibility with old displays.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_evpn.c
bgpd/bgp_vty.c
bgpd/bgp_vty.h
bgpd/bgpd.c
bgpd/bgpd.h
tests/bgpd/test_capability.c
tests/bgpd/test_mp_attr.c
tests/bgpd/test_packet.c