sonic-buildimage/dockers/docker-fpm-frr
pavel-shirshov cd8417afd7 [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-15 08:20:14 -08:00
..
base_image_files [monit] Fix status error due to shebang change (#5865) 2020-11-09 01:52:22 -08:00
frr [bgpcfgd]: Support default action for "Allow prefix" feature (#6370) 2021-01-09 08:29:19 -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 [dockers] Update critical_processes file syntax (#4831) 2020-06-25 21:18:21 -07:00
docker_init.sh [supervisord]: use abspath as supervisord entrypoint (#5995) 2020-11-22 21:18:44 -08:00
Dockerfile.j2 [docker-fpm-frr]: Upgrade docker-fpm-frr to buster (#4920) 2020-07-29 14:19:03 -07:00
snmp.conf [FRR] Enable SNMP support (#2981) 2019-06-19 01:24:42 -07:00
TSA [docker-frr]: Use egrep with regexp to match correct TSA rules (#6403) 2021-01-15 08:20:14 -08:00
TSB [docker-frr]: Use egrep with regexp to match correct TSA rules (#6403) 2021-01-15 08:20:14 -08:00
TSC [docker-frr]: Use egrep with regexp to match correct TSA rules (#6403) 2021-01-15 08:20:14 -08:00
vtysh.conf [sonic-frr]: FRR 4.0 integration with SONiC (#2099) 2018-10-02 10:24:59 -07:00