summaryrefslogtreecommitdiff
path: root/pbrd/pbr_map.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2020-07-01 20:02:37 -0400
committerStephen Worley <sworley@cumulusnetworks.com>2020-07-09 11:51:23 -0400
commit09813729c7625ff81056f24763d620f7d33251fa (patch)
tree60dc21084d8bc5a5364e1246c7b7bd9f45e88e1c /pbrd/pbr_map.c
parent6db1188f0e3f3ad407cf45a7190800c00ca6bb26 (diff)
pbrd: nhgc state improvements when installed/removed
Cleanup the marking of a nhc as installed/removed based on table route installation. We were not even handling the removal state at all. We saw some timing issues with the routes being installed/removed multiple times and then never resending the pbr map due to bad states on the nhgc. Dont worry about checking if its already marked installed before scheduling the policy walk. We have a check in `pbr_send_map()` to ensure we dont try to resend a map sequence already installed. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'pbrd/pbr_map.c')
-rw-r--r--pbrd/pbr_map.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pbrd/pbr_map.c b/pbrd/pbr_map.c
index edc3f1d8da..0ef8432e5e 100644
--- a/pbrd/pbr_map.c
+++ b/pbrd/pbr_map.c
@@ -603,7 +603,7 @@ bool pbr_map_check_valid(const char *name)
return pbrm->valid;
}
-void pbr_map_schedule_policy_from_nhg(const char *nh_group)
+void pbr_map_schedule_policy_from_nhg(const char *nh_group, bool installed)
{
struct pbr_map_sequence *pbrms;
struct pbr_map *pbrm;
@@ -618,7 +618,7 @@ void pbr_map_schedule_policy_from_nhg(const char *nh_group)
if (pbrms->nhgrp_name
&& (strcmp(nh_group, pbrms->nhgrp_name) == 0)) {
- pbrms->nhs_installed = true;
+ pbrms->nhs_installed = installed;
pbr_map_check(pbrms, false);
}
@@ -626,7 +626,7 @@ void pbr_map_schedule_policy_from_nhg(const char *nh_group)
if (pbrms->nhg
&& (strcmp(nh_group, pbrms->internal_nhg_name)
== 0)) {
- pbrms->nhs_installed = true;
+ pbrms->nhs_installed = installed;
pbr_map_check(pbrms, false);
}