diff options
author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-11-25 06:45:24 +0100 |
---|---|---|
committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-12-03 21:56:00 +0100 |
commit | fde8af8d0b5634883393922079c3a688dcec9dd5 (patch) | |
tree | d0fcee082f0c2823482802f9db023b38584b48c1 /pbrd | |
parent | Merge pull request #5442 from opensourcerouting/mpls-label-stacks (diff) | |
download | frr-fde8af8d0b5634883393922079c3a688dcec9dd5.tar.xz frr-fde8af8d0b5634883393922079c3a688dcec9dd5.zip |
pbrd: don't set rule removed on fail
Don't treat a remove failure as a successful remove.
This can cause us to get out of sync with the kernel.
Pbrd makes decisions on rule handling based on its installed
state so this needs to be as close to accurate as possible.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'pbrd')
-rw-r--r-- | pbrd/pbr_zebra.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pbrd/pbr_zebra.c b/pbrd/pbr_zebra.c index b0a689a7e..f0b0f8891 100644 --- a/pbrd/pbr_zebra.c +++ b/pbrd/pbr_zebra.c @@ -244,6 +244,11 @@ static int rule_notify_owner(ZAPI_CALLBACK_ARGS) __PRETTY_FUNCTION__, pbrms->installed); break; case ZAPI_RULE_FAIL_REMOVE: + /* Don't change state on rule removal failure */ + DEBUGD(&pbr_dbg_zebra, + "%s: Received RULE_FAIL_REMOVED: %" PRIu64, + __PRETTY_FUNCTION__, pbrms->installed); + break; case ZAPI_RULE_REMOVED: pbrms->installed &= ~installed; DEBUGD(&pbr_dbg_zebra, "%s: Received RULE REMOVED: %" PRIu64, |