From: Don Slice Date: Thu, 22 Mar 2018 13:56:56 +0000 (+0000) Subject: pbrd: fix deletion of match or src of valid pbr-map X-Git-Tag: frr-5.0-dev~63^2~8 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=66fd4b64e5e0a6d6d5f524c48889ced674d7c6e0;p=matthieu%2Ffrr.git 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 --- diff --git a/pbrd/pbr_map.c b/pbrd/pbr_map.c index ea79320a71..5962509e82 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,