summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-08-26 15:49:18 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-08-26 15:49:18 +0200
commit9131e6e818b36b00373ccb8a2b9ed6cc60640bf2 (patch)
tree0c3d50889fe33bb9d46fe56c9a80c807bcce5e4b /bgpd
parentMerge pull request #4812 from pogojotz/fix-destination-multi-use (diff)
downloadfrr-9131e6e818b36b00373ccb8a2b9ed6cc60640bf2.tar.xz
frr-9131e6e818b36b00373ccb8a2b9ed6cc60640bf2.zip
bgpd: Add 'no set as-path prepend last-as X' command
The `set as-path prepend last-as X` command had no, 'no' form of the command. Add this into the cli. Testing: ! route-map BLARBLE permit 10 set as-path prepend last-as 3 ! ! router bgp 9999 neighbor 10.50.12.118 remote-as external neighbor 10.50.12.118 ebgp-multihop 30 ! address-family ipv4 unicast neighbor 10.50.12.118 route-map BLARBLE in ! ! eva# show bgp ipv4 uni 4.4.4.4 BGP routing table entry for 4.4.4.4/32 Paths: (1 available, best #1, table default) Advertised to non peer-group peers: 10.50.12.118 999 999 999 999 10.50.12.118 from 10.50.12.118 (10.50.12.118) Origin incomplete, metric 0, valid, external, best (First path received) Last update: Mon Aug 26 09:47:17 2019 eva# conf eva(config)# route-map BLARBLE permit 10 eva(config-route-map)# no set as-path prepend last-as 3 eva(config-route-map)# end eva# clear bgp ipv4 uni * eva# show bgp ipv4 uni 4.4.4.4 BGP routing table entry for 4.4.4.4/32 Paths: (1 available, best #1, table default) Advertised to non peer-group peers: 10.50.12.118 999 10.50.12.118 from 10.50.12.118 (10.50.12.118) Origin incomplete, metric 0, valid, external, best (First path received) Last update: Mon Aug 26 09:48:31 2019 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_routemap.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 7f1a9b71c..aaae9e380 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -4158,6 +4158,18 @@ DEFUN (no_set_aspath_prepend,
return ret;
}
+DEFUN (no_set_aspath_prepend_lastas,
+ no_set_aspath_prepend_lastas_cmd,
+ "no set as-path prepend last-as [(1-10)]",
+ NO_STR
+ SET_STR
+ "Transform BGP AS_PATH attribute\n"
+ "Prepend to the as-path\n"
+ "Use the peers AS-number\n"
+ "Number of times to insert\n")
+{
+ return no_set_aspath_prepend(self, vty, argc, argv);
+}
DEFUN (set_aspath_exclude,
set_aspath_exclude_cmd,
@@ -5123,6 +5135,7 @@ void bgp_route_map_init(void)
install_element(RMAP_NODE, &set_aspath_prepend_lastas_cmd);
install_element(RMAP_NODE, &set_aspath_exclude_cmd);
install_element(RMAP_NODE, &no_set_aspath_prepend_cmd);
+ install_element(RMAP_NODE, &no_set_aspath_prepend_lastas_cmd);
install_element(RMAP_NODE, &no_set_aspath_exclude_cmd);
install_element(RMAP_NODE, &no_set_aspath_exclude_all_cmd);
install_element(RMAP_NODE, &set_origin_cmd);