sonic-buildimage/dockers/docker-fpm-frr
pavel-shirshov beaaf3316d [docker-frr]: Use egrep with regexp to match correct TSA rules (#6403)
**- Why I did it**
Earlier today we found a bug in the SONiC TSA implementation.
TSC shows incorrect output (see below) in case we have a route-map which contains TSA route-map as a prefix.
```
admin@str-s6100-acs-1:~$ TSC
Traffic Shift Check:
System Mode: Not consistent
```
The reason is that TSC implementation has too loose regexps in TSA utilities, which match wrong route-map entries:
For example, current TSC matches following
```
route-map TO_BGP_PEER_V4 permit 200
route-map TO_BGP_PEER_V6 permit 200
```
But it should match only
```
route-map TO_BGP_PEER_V4 permit 20
route-map TO_BGP_PEER_V4 deny 30
route-map TO_BGP_PEER_V6 permit 20
route-map TO_BGP_PEER_V6 deny 30
```

**- How I did it**
I fixed it by using egrep with `^` and `$` regexp markers which match begin and end of the line.

**- How to verify it**
1. Add follwing entry to FRR config:
```
str-s6100-acs-1# 
str-s6100-acs-1# conf t
str-s6100-acs-1(config)# route-map TO_BGP_PEER_V4 permit 200 
str-s6100-acs-1(config-route-map)# end
```
2. Use the TSC command and check output. It should show normal.
```
admin@str-s6100-acs-1:~$ TSC
Traffic Shift Check:
System Mode: Normal```
2021-01-20 10:37:10 -08:00
..
base_image_files [monit] Adding patch to enhance syslog error message generation for monit alert action when status is failed. (#5720) 2020-11-01 10:27:10 -08:00
frr [bgpcfgd]: Support default action for "Allow prefix" feature (#6370) 2021-01-08 15:12:52 -08:00
.dockerignore [docker-fpm-frr]:filter out the file of 'Dockerfile.j2' from the 'docker-fpm-frr' image. (#3507) 2019-09-27 12:43:44 -07:00
critical_processes [201911][dockers] Update critical_processes file syntax (#4854) 2020-06-26 11:37:05 -07:00
Dockerfile.j2 [bgpcfgd]: make a package for bgpcfgd (#4813) 2020-07-05 15:51:05 -07:00
snmp.conf [FRR] Enable SNMP support (#2981) 2019-06-19 01:24:42 -07:00
start.sh [fpm-frr] fix start.sh template paths (#6329) 2020-12-31 17:01:24 -08:00
supervisord.conf Renamed sonic-bgpcfgd/bgpmon_proj directory to sonic-bfgcfgd/bgpmon so it is in sync with master branch naming change. Also made bgpmon auto restart enabled (#5453) 2020-09-24 08:57:55 -07:00
TSA [docker-frr]: Use egrep with regexp to match correct TSA rules (#6403) 2021-01-20 10:37:10 -08:00
TSB [docker-frr]: Use egrep with regexp to match correct TSA rules (#6403) 2021-01-20 10:37:10 -08:00
TSC [docker-frr]: Use egrep with regexp to match correct TSA rules (#6403) 2021-01-20 10:37:10 -08:00
vtysh.conf [sonic-frr]: FRR 4.0 integration with SONiC (#2099) 2018-10-02 10:24:59 -07:00