summaryrefslogtreecommitdiff
path: root/lib/command_py.c
diff options
context:
space:
mode:
authorVisakha Erina <visakha.erina@broadcom.com>2019-06-19 06:38:31 -0700
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-06-20 01:51:38 -0400
commit0277936a2cb2228eb5367b83297707d360721fb3 (patch)
treef386cd42d2d289684c1d9de98b48b18c116555c2 /lib/command_py.c
parenteb7fce2eea3cd0e0360ca7de2ad2bed61ab130b0 (diff)
lib: Keep proper count of prefix-list hit-count when used
When a prefix-list is applied to a BGP neighbor to deny the learning of specific routes, the hit count is showing 0 for BGP even though the routes are being filtered correctly due to the configured prefix-list. Before fix: c1# show ip prefix-list nag seq 10 ZEBRA: seq 10 permit any (hit count: 0, refcount: 0) BGP: seq 10 permit any (hit count: 0, refcount: 0) c1# show ip prefix-list nag seq 5 ZEBRA: seq 5 deny 1.0.1.0/24 (hit count: 0, refcount: 0) BGP: seq 5 deny 1.0.1.0/24 (hit count: 0, refcount: 0) Fix: Increment the prefix-list's hit count whenever a rule match occurs. After Fix: c1# show ip prefix-list nag seq 10 ZEBRA: seq 10 permit any (hit count: 0, refcount: 0) BGP: seq 10 permit any (hit count: 6, refcount: 0) c1# show ip prefix-list nag seq 5 ZEBRA: seq 5 deny 1.0.1.0/24 (hit count: 0, refcount: 0) BGP: seq 5 deny 1.0.1.0/24 (hit count: 1, refcount: 0) Signed-off-by: Visakha Erina visakha.erina@broadcom.com
Diffstat (limited to 'lib/command_py.c')
0 files changed, 0 insertions, 0 deletions