diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-08-28 14:40:16 -0400 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-25 11:13:43 -0400 |
| commit | 08c51a385dbe501a48536cae74fa3274e08f753c (patch) | |
| tree | 63c6361612702af6c2d93fdf8b3f801ab1c6d8ff | |
| parent | 61d9ffe168b4890bb1a91dc2907e00d3c5cd38f2 (diff) | |
zebra: Only check nexthop status on route install/update
We do not need to check that the nexthop is installed or queued
when sending a route deletion since we only need to the prefix for it.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
| -rw-r--r-- | zebra/zebra_dplane.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index 04aca1ac7e..dea51ded1b 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -1534,8 +1534,13 @@ static int dplane_ctx_route_init(struct zebra_dplane_ctx *ctx, /* * Check if the nhe is installed/queued before doing anything * with this route. + * + * If its a delete we only use the prefix anyway, so this only + * matters for INSTALL/UPDATE. */ - if (!CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED) + if (((op == DPLANE_OP_ROUTE_INSTALL) + || (op == DPLANE_OP_ROUTE_UPDATE)) + && !CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED) && !CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_QUEUED)) { ret = ENOENT; goto done; |
