]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: Return success if lcomm/comm/extcomm name or entry is not found
authorPooja Jagadeesh Doijode <pdoijode@nvidia.com>
Fri, 17 May 2024 19:03:20 +0000 (12:03 -0700)
committerPooja Jagadeesh Doijode <pdoijode@nvidia.com>
Fri, 24 May 2024 18:25:00 +0000 (11:25 -0700)
commit773a45ef29e0ab128492f2ed8a9bb014f5d75b70
tree5fde54afa9e35564c74d874a4632b925c1636f7a
parent4bd16486e9a34d4ae8173277b3d1526e821152c1
bgpd: Return success if lcomm/comm/extcomm name or entry is not found

Problem:
Currently bgp prints `Can't find community-list` and returns CMD_WARNING_CONFIG_FAILED
error if name or an entry for community, large-community and ext-community is not found. This
causes frr-reload to fail.

Fix:
Return success if community, large-community and ext-community name or
an entry is not found.

Ticket:#3900813
Testing Done:

Before fix:
```
root@tor-4:mgmt:/var/home/cumulus# cat /etc/frr/frr.conf
<SNIP>
bgp large-community-list standard lc22 seq 10 permit 4200857911:011:01 4200857911:011:011555
no bgp large-community-list standard lc22 seq 10 permit 4200857911:011:01
<SNIP>

root@tor-4:mgmt:/var/home/cumulus# systemctl reload frr
Job for frr.service failed.
See "systemctl status frr.service" and "journalctl -xeu frr.service" for details.

Syslog:
<SNIP>
2024-05-21T21:02:51.525965+00:00 tor-4 frrinit.sh[2349145]: % Can't find community-list
2024-05-21T21:02:51.526487+00:00 tor-4 staticd[6167]: [VTVCM-Y2NW3] Configuration Read in Took: 00:00:00
2024-05-21T21:02:51.526595+00:00 tor-4 frrinit.sh[2349155]: [2349155|staticd] done
2024-05-21T21:02:51.526826+00:00 tor-4 frrinit.sh[2349145]: line 176: Failure to communicate[13] to bgpd, line: no bgp large-community-list standard lc22 seq 10 permit 4200857911:011:01
2024-05-21T21:02:51.527928+00:00 tor-4 frrinit.sh[2349153]: [2349153|watchfrr] done
2024-05-21T21:02:51.528382+00:00 tor-4 frrinit.sh[2349145]: [2349145|bgpd] Configuration file[/etc/frr/frr.conf] processing failure: 13
<SNIP>
```

After fix:
```
root@tor-4:mgmt:/var/home/cumulus# cat /etc/frr/frr.conf
<SNIP>
bgp large-community-list standard lc22 seq 10 permit 4200857911:011:01 4200857911:011:011555
no bgp large-community-list standard lc22 seq 10 permit 4200857911:011:01
<SNIP>

root@tor-4:mgmt:/var/home/cumulus# systemctl reload frr
root@tor-4:mgmt:/var/home/cumulus#

root@tor-4:mgmt:/var/home/cumulus# vtysh -c "show run" | grep lc22
bgp large-community-list standard lc22 seq 10 permit 4200857911:11:1 4200857911:11:11555
root@tor-4:mgmt:/var/home/cumulus#
```

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
Signed-off-by: Chirag Shah <chirag@nvidia.com>
bgpd/bgp_clist.c
bgpd/bgp_clist.h
bgpd/bgp_vty.c