summaryrefslogtreecommitdiffstats
path: root/pbrd/pbr_map.c
diff options
context:
space:
mode:
authorDon Slice <dslice@cumulusnetworks.com>2018-03-22 14:56:56 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-04-06 19:22:43 +0200
commit66fd4b64e5e0a6d6d5f524c48889ced674d7c6e0 (patch)
tree6053ee082f648ea65a187b9205453c6f1951e106 /pbrd/pbr_map.c
parentpbrd: add ability to delete routes and rules correctly (diff)
downloadfrr-66fd4b64e5e0a6d6d5f524c48889ced674d7c6e0.tar.xz
frr-66fd4b64e5e0a6d6d5f524c48889ced674d7c6e0.zip
pbrd: fix deletion of match or src of valid pbr-map
When removing either the match dst or match src of a previously valid pbr map, we would just try to re-install the rule which was rejected. This fix deletes the old rule before we re-apply the new rule. Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'pbrd/pbr_map.c')
-rw-r--r--pbrd/pbr_map.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pbrd/pbr_map.c b/pbrd/pbr_map.c
index ea79320a7..5962509e8 100644
--- a/pbrd/pbr_map.c
+++ b/pbrd/pbr_map.c
@@ -527,6 +527,13 @@ void pbr_map_check(struct pbr_map_sequence *pbrms)
__PRETTY_FUNCTION__, pbrm->name, pbrms->seqno, pbrms->reason);
if (pbrms->reason == PBR_MAP_VALID_SEQUENCE_NUMBER) {
+ if (pbrms->installed) {
+ install = false;
+ for (ALL_LIST_ELEMENTS_RO(pbrm->incoming, inode, pmi)) {
+ pbr_send_pbr_map(pbrms, pmi, install);
+ }
+ install = true;
+ }
install = true;
DEBUGD(&pbr_dbg_map, "%s: Installing %s(%u) reason: %" PRIu64,
__PRETTY_FUNCTION__, pbrm->name, pbrms->seqno,