]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Add a knob to force maximum-prefix even for filtered routes 6801/head
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Fri, 24 Jul 2020 08:08:05 +0000 (11:08 +0300)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Sun, 26 Jul 2020 20:16:37 +0000 (23:16 +0300)
commit9cbd06e0f8758930dd783d6f0e8a49984465fffa
tree42de88f326cfe3c8edc5bbe9153c82290e95f551
parentc1bcac1d7802bddaa3f9e023c4ef8588007db864
bgpd: Add a knob to force maximum-prefix even for filtered routes

If _force_ is set, then ALL prefixes are counted for maximum instead of
accepted only. This is useful for cases where an inbound filter is applied,
but you want maximum-prefix to act on ALL (including filtered) prefixes.

For instance, we have a configuration like:

neighbor r1 maximum-prefix 10
neighbor r1 prefix-list custom in
!
ip prefix-list custom seq 1 permit 10.0.0.0/24
ip prefix-list custom seq 2 permit 10.0.1.0/24

This will accept only 2 prefixes and discard all others instead of
shutting down the session when 10 is reached.

With this new knob (force), we will count all received prefixes and shutdown
the session when 10 is reached.

The bigger problem is when you have lots of peers with full feed and such a
configuration like in an example.

This is kinda re-ordering of how to treat filter vs. maximum-prefix.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
bgpd/bgp_route.c
bgpd/bgp_vty.c
bgpd/bgpd.c
bgpd/bgpd.h