]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pbrd: fix deletion of match or src of valid pbr-map
authorDon Slice <dslice@cumulusnetworks.com>
Thu, 22 Mar 2018 13:56:56 +0000 (13:56 +0000)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 6 Apr 2018 17:22:43 +0000 (13:22 -0400)
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>
pbrd/pbr_map.c

index ea79320a712501a12bbd9adc61d3667b383366f6..5962509e822824497afbf3b7ebc76a80e3158816 100644 (file)
@@ -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,