summaryrefslogtreecommitdiffstats
path: root/pbrd/pbr_vrf.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-08-20 16:34:38 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2020-08-28 13:51:06 +0200
commitfcf29c6919853416a86f72c510d488490bdd208f (patch)
tree6139235c54cd706137aa25728cc49d52298b7027 /pbrd/pbr_vrf.c
parentlib: break up show nexthop API a bit for reuse (diff)
downloadfrr-fcf29c6919853416a86f72c510d488490bdd208f.tar.xz
frr-fcf29c6919853416a86f72c510d488490bdd208f.zip
pbrd: Properly hook back up when vrf is destroyed than recreated
Currently when a vrf is deleted than added back in PBR was not going through and touching up all the data structures that needed to be massaged to allow it to start working again. This includes: a) Search through the nexthop groups to find any nexthop that references the old nexthop id and set it right again. b) Search through the nexthop cache for nht and reset those nexthops to the right vrf as well as re-register Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pbrd/pbr_vrf.c')
-rw-r--r--pbrd/pbr_vrf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pbrd/pbr_vrf.c b/pbrd/pbr_vrf.c
index d5a2bd0fe..389e5e8be 100644
--- a/pbrd/pbr_vrf.c
+++ b/pbrd/pbr_vrf.c
@@ -25,6 +25,7 @@
#include "pbr_memory.h"
#include "pbr_map.h"
#include "pbr_debug.h"
+#include "pbr_nht.h"
DEFINE_MTYPE_STATIC(PBRD, PBR_MAP_VRF, "PBR Map VRF")
@@ -59,6 +60,7 @@ static int pbr_vrf_enable(struct vrf *vrf)
{
DEBUGD(&pbr_dbg_event, "%s: %u (%s)", __func__, vrf->vrf_id, vrf->name);
+ pbr_nht_vrf_update(vrf->info);
pbr_map_vrf_update(vrf->info);
return 0;