diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-08-20 16:34:38 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-08-28 13:51:06 +0200 |
commit | fcf29c6919853416a86f72c510d488490bdd208f (patch) | |
tree | 6139235c54cd706137aa25728cc49d52298b7027 /pbrd/pbr_nht.h | |
parent | lib: break up show nexthop API a bit for reuse (diff) | |
download | frr-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_nht.h')
-rw-r--r-- | pbrd/pbr_nht.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pbrd/pbr_nht.h b/pbrd/pbr_nht.h index cbcf71d2f..d1afbaa73 100644 --- a/pbrd/pbr_nht.h +++ b/pbrd/pbr_nht.h @@ -28,6 +28,8 @@ #define PBR_NHC_NAMELEN PBR_MAP_NAMELEN + 10 +extern struct hash *pbr_nhg_hash; + struct pbr_nexthop_group_cache { char name[PBR_NHC_NAMELEN]; @@ -46,6 +48,8 @@ struct pbr_nexthop_group_cache { struct pbr_nexthop_cache { struct pbr_nexthop_group_cache *parent; + char vrf_name[VRF_NAMSIZ + 1]; + struct nexthop *nexthop; bool valid; @@ -126,4 +130,6 @@ extern void pbr_nht_nexthop_update(struct zapi_route *nhr); extern void pbr_nht_nexthop_interface_update(struct interface *ifp); extern void pbr_nht_init(void); + +extern void pbr_nht_vrf_update(struct pbr_vrf *pbr_vrf); #endif |