summaryrefslogtreecommitdiff
path: root/pbrd/pbr_zebra.c
diff options
context:
space:
mode:
Diffstat (limited to 'pbrd/pbr_zebra.c')
-rw-r--r--pbrd/pbr_zebra.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/pbrd/pbr_zebra.c b/pbrd/pbr_zebra.c
index b0a689a7e4..ec0327d74f 100644
--- a/pbrd/pbr_zebra.c
+++ b/pbrd/pbr_zebra.c
@@ -234,23 +234,21 @@ static int rule_notify_owner(ZAPI_CALLBACK_ARGS)
switch (note) {
case ZAPI_RULE_FAIL_INSTALL:
pbrms->installed &= ~installed;
- DEBUGD(&pbr_dbg_zebra,
- "%s: Received RULE_FAIL_INSTALL: %" PRIu64,
- __PRETTY_FUNCTION__, pbrms->installed);
break;
case ZAPI_RULE_INSTALLED:
pbrms->installed |= installed;
- DEBUGD(&pbr_dbg_zebra, "%s: Received RULE_INSTALLED: %" PRIu64,
- __PRETTY_FUNCTION__, pbrms->installed);
break;
case ZAPI_RULE_FAIL_REMOVE:
+ /* Don't change state on rule removal failure */
+ break;
case ZAPI_RULE_REMOVED:
pbrms->installed &= ~installed;
- DEBUGD(&pbr_dbg_zebra, "%s: Received RULE REMOVED: %" PRIu64,
- __PRETTY_FUNCTION__, pbrms->installed);
break;
}
+ DEBUGD(&pbr_dbg_zebra, "%s: Received %s: %" PRIu64, __func__,
+ zapi_rule_notify_owner2str(note), pbrms->installed);
+
pbr_map_final_interface_deletion(pbrms->parent, pmi);
return 0;
@@ -281,6 +279,7 @@ static void route_add_helper(struct zapi_route *api, struct nexthop_group nhg,
api_nh = &api->nexthops[i];
api_nh->vrf_id = nhop->vrf_id;
api_nh->type = nhop->type;
+ api_nh->weight = nhop->weight;
switch (nhop->type) {
case NEXTHOP_TYPE_IPV4:
api_nh->gate.ipv4 = nhop->gate.ipv4;