summaryrefslogtreecommitdiffstats
path: root/pbrd/pbr_map.c
diff options
context:
space:
mode:
authorDon Slice <dslice@cumulusnetworks.com>2018-03-21 22:23:32 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-04-06 19:22:43 +0200
commitff9799c31ebff3360706eaaad96c5cd27e3eaef6 (patch)
tree4883563c97c1ab87e012e20651d2677362ff7ec5 /pbrd/pbr_map.c
parentlib: dont break display of nexthop-groups themselves (diff)
downloadfrr-ff9799c31ebff3360706eaaad96c5cd27e3eaef6.tar.xz
frr-ff9799c31ebff3360706eaaad96c5cd27e3eaef6.zip
pbrd: add ability to delete routes and rules correctly
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'pbrd/pbr_map.c')
-rw-r--r--pbrd/pbr_map.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/pbrd/pbr_map.c b/pbrd/pbr_map.c
index f3ecc5882..ea79320a7 100644
--- a/pbrd/pbr_map.c
+++ b/pbrd/pbr_map.c
@@ -476,10 +476,10 @@ void pbr_map_check_nh_group_change(const char *nh_group)
{
struct pbr_map_sequence *pbrms;
struct pbr_map *pbrm;
- struct listnode *node;
+ struct listnode *node, *inode;
+ struct pbr_map_interface *pmi;
bool found_name;
- zlog_warn("*** %s for %s ***", __func__, nh_group);
RB_FOREACH (pbrm, pbr_map_entry_head, &pbr_maps) {
for (ALL_LIST_ELEMENTS_RO(pbrm->seqnumbers, node, pbrms)) {
found_name = false;
@@ -495,9 +495,15 @@ void pbr_map_check_nh_group_change(const char *nh_group)
pbr_map_check_valid_internal(pbrm);
- if (original != pbrm->valid)
+ if (pbrm->valid && (original != pbrm->valid))
pbr_map_install(pbrm);
- break;
+
+ if (pbrm->valid == false)
+ for (ALL_LIST_ELEMENTS_RO(
+ pbrm->incoming, inode,
+ pmi))
+ pbr_send_pbr_map(pbrms, pmi,
+ false);
}
}
}