diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-09-13 10:51:41 +0300 | 
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-09-13 10:51:41 +0300 | 
| commit | cadfa693d618f56c9fcffd2cd227917f15953711 (patch) | |
| tree | ac4c6e3d179b0078c343561cf6884746a6374416 /bgpd/bgp_updgrp.c | |
| parent | bf1fa1b2dfeebb4fefcf3655111f30a766b6bc6d (diff) | |
bgpd: Implement BGP dual-as feature
This is helpful for migrations, etc.
The neighbor is configured with:
```
router bgp 65000
 neighbor X local-as 65001 no-prepend replace-as dual-as
```
Neighbor X can use either 65000, or 65001 to peer with.
Closes: https://github.com/FRRouting/frr/issues/13928
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_updgrp.c')
| -rw-r--r-- | bgpd/bgp_updgrp.c | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index 115bc35cdc..90c43b938f 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -783,8 +783,11 @@ static int update_group_show_walkcb(struct update_group *updgrp, void *arg)  				json_updgrp, "replaceLocalAs",  				CHECK_FLAG(updgrp->conf->flags,  					   PEER_FLAG_LOCAL_AS_REPLACE_AS)); +			json_object_boolean_add(json_updgrp, "dualAs", +						CHECK_FLAG(updgrp->conf->flags, +							   PEER_FLAG_DUAL_AS));  		} else { -			vty_out(vty, "  Local AS %u%s%s\n", +			vty_out(vty, "  Local AS %u%s%s%s\n",  				updgrp->conf->change_local_as,  				CHECK_FLAG(updgrp->conf->flags,  					   PEER_FLAG_LOCAL_AS_NO_PREPEND) @@ -793,6 +796,10 @@ static int update_group_show_walkcb(struct update_group *updgrp, void *arg)  				CHECK_FLAG(updgrp->conf->flags,  					   PEER_FLAG_LOCAL_AS_REPLACE_AS)  					? " replace-as" +					: "", +				CHECK_FLAG(updgrp->conf->flags, +					   PEER_FLAG_DUAL_AS) +					? " dual-as"  					: "");  		}  	}  | 
