Skip to content

Commit

Permalink
bgpd: Revalidate redistributed routes also when RPKI state changes
Browse files Browse the repository at this point in the history
If we have something like:

```
router bgp 65001
 redistribute connected route-map rpki
!
route-map rpki permit 10
 match rpki valid
 set local-preference 150
route-map rpki permit 20
 match rpki notfound
 set local-preference 50
!
```

Then connected routes are never revalidated when RPKI state changes. E.g. if it was
valid, and moves to notfound => local-preference remains 150, but should be 50.

With this patch we force redistributed routes to be revalidated when
revalidation event is triggered from RPKI module.

Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Jul 27, 2024
1 parent 8f1367e commit f93dea3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bgpd/bgp_rpki.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "bgpd/bgp_route.h"
#include "bgpd/bgp_rpki.h"
#include "bgpd/bgp_debug.h"
#include "bgpd/bgp_zebra.h"
#include "northbound_cli.h"

#include "lib/network.h"
Expand Down Expand Up @@ -725,6 +726,7 @@ static void revalidate_all_routes(struct rpki_vrf *rpki_vrf)
continue;

bgp_static_add(bgp);
bgp_redistribute_redo(bgp);

for (ALL_LIST_ELEMENTS_RO(bgp->peer, peer_listnode, peer)) {
afi_t afi;
Expand Down

0 comments on commit f93dea3

Please sign in to comment.