summaryrefslogtreecommitdiff
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index b1d0c1e3a6..95ac68fb90 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1833,6 +1833,19 @@ enum zebra_dplane_result kernel_route_update(struct zebra_dplane_ctx *ctx)
if (p->family == AF_INET || v6_rr_semantics) {
/* Single 'replace' operation */
cmd = RTM_NEWROUTE;
+
+ /*
+ * With route replace semantics in place
+ * for v4 routes and the new route is a system
+ * route we do not install anything.
+ * The problem here is that the new system
+ * route should cause us to withdraw from
+ * the kernel the old non-system route
+ */
+ if (RSYSTEM_ROUTE(dplane_ctx_get_type(ctx)) &&
+ !RSYSTEM_ROUTE(dplane_ctx_get_old_type(ctx)))
+ (void)netlink_route_multipath(RTM_DELROUTE,
+ ctx);
} else {
/*
* So v6 route replace semantics are not in