]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Add `set as-path replace <any|ASN>` cmd for route-maps 11086/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Mon, 25 Apr 2022 07:34:36 +0000 (10:34 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Mon, 25 Apr 2022 11:05:22 +0000 (14:05 +0300)
commit77e3d82167b97a1ff4abe59d6e4f12086a61d9f9
tree5c68e86eaa6fd6b9734e40928b6bee1390377299
parentc27892b24d21762f3cd4276fa2cca75c958f9b15
bgpd: Add `set as-path replace <any|ASN>` cmd for route-maps

```
route-map tstas permit 10
 set as-path replace 1
exit
```

Before:

```
donatas-laptop(config-router-af)# do show ip bgp 10.10.10.10/32
BGP routing table entry for 10.10.10.10/32, version 13
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  192.168.10.65
  65000 1 2 3 123
    192.168.10.65 from 192.168.10.65 (10.10.10.11)
      Origin IGP, metric 0, valid, external, best (First path received)
      Last update: Mon Apr 25 10:39:50 2022
```

After:

```
donatas-laptop(config-router-af)# do show ip bgp 10.10.10.10/32
BGP routing table entry for 10.10.10.10/32, version 15
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  192.168.10.65
  65000 65010 2 3 123
    192.168.10.65 from 192.168.10.65 (10.10.10.11)
      Origin IGP, metric 0, valid, external, best (First path received)
      Last update: Mon Apr 25 10:40:16 2022
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
18 files changed:
bgpd/bgp_aspath.c
bgpd/bgp_aspath.h
bgpd/bgp_routemap.c
bgpd/bgp_routemap_nb.c
bgpd/bgp_routemap_nb.h
bgpd/bgp_routemap_nb_config.c
doc/user/bgp.rst
lib/routemap.h
lib/routemap_cli.c
tests/topotests/bgp_set_aspath_replace/__init__.py [new file with mode: 0644]
tests/topotests/bgp_set_aspath_replace/r1/bgpd.conf [new file with mode: 0644]
tests/topotests/bgp_set_aspath_replace/r1/zebra.conf [new file with mode: 0644]
tests/topotests/bgp_set_aspath_replace/r2/bgpd.conf [new file with mode: 0644]
tests/topotests/bgp_set_aspath_replace/r2/zebra.conf [new file with mode: 0644]
tests/topotests/bgp_set_aspath_replace/r3/bgpd.conf [new file with mode: 0644]
tests/topotests/bgp_set_aspath_replace/r3/zebra.conf [new file with mode: 0644]
tests/topotests/bgp_set_aspath_replace/test_bgp_set_aspath_replace.py [new file with mode: 0644]
yang/frr-bgp-route-map.yang