]> git.puffer.fish Git - mirror/frr.git/commit
lib: Take ge/le into consideration when checking the prefix with the prefix-list 17615/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 10 Dec 2024 14:28:26 +0000 (16:28 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 10 Dec 2024 14:28:26 +0000 (16:28 +0200)
commitdd4c2acc2e871283256f6cea16ede6d2d7f72dfe
tree178c7b5db3cff3a5e52ce5c89f31c53e49ff2ae3
parentc05c2b15e53b00caee4ec7742da3400d3c2d2538
lib: Take ge/le into consideration when checking the prefix with the prefix-list

Without the fix:

```
show ip prefix-list test_1 10.20.30.96/27 first-match
 <no result>

show ip prefix-list test_2 192.168.1.2/32 first-match
 <no result>
```

With the fix:

```
ip prefix-list test_1 seq 10 permit 10.20.30.64/26 le 27
!
end
donatas# show ip prefix-list test_1 10.20.30.96/27
   seq 10 permit 10.20.30.64/26 le 27 (hit count: 1, refcount: 0)
donatas# show ip prefix-list test_1 10.20.30.64/27
   seq 10 permit 10.20.30.64/26 le 27 (hit count: 2, refcount: 0)
donatas# show ip prefix-list test_1 10.20.30.64/28
donatas# show ip prefix-list test_1 10.20.30.126/26
   seq 10 permit 10.20.30.64/26 le 27 (hit count: 3, refcount: 0)
donatas# show ip prefix-list test_1 10.20.30.126/30
donatas#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
lib/plist.c