summaryrefslogtreecommitdiff
path: root/lib/nexthop.h
diff options
context:
space:
mode:
authorDon Slice <dslice@cumulusnetworks.com>2019-04-15 18:27:00 +0000
committerDon Slice <dslice@cumulusnetworks.com>2019-04-19 16:56:07 +0000
commite47c4d3cfe7bf7c97f4b10fc6347f484093f14bd (patch)
tree014ce7ef567c126d8bdee5e11392de7b6e21c7f4 /lib/nexthop.h
parentfd3938ac3dd36b4c09ec5023769dd4cfc6ee0fc6 (diff)
zebra: stop sending invalid nexthops to clients
Found that zebra_rnh_apply_nht_rmap would set the NEXTHOP_FLAG_ACTIVE if not blocked by the route-map, even if the flag was not active prior to the check. This fix changes the flag used to denote the nexthop is filtered so that proper active state can be retained. Additionally, found two cases where we would send invalid nexthops via send_client, which would also cause this crash. All three fixed in this commit. Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'lib/nexthop.h')
-rw-r--r--lib/nexthop.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/nexthop.h b/lib/nexthop.h
index ad87c2e522..663acaeb69 100644
--- a/lib/nexthop.h
+++ b/lib/nexthop.h
@@ -82,6 +82,7 @@ struct nexthop {
#define NEXTHOP_FLAG_ONLINK (1 << 3) /* Nexthop should be installed onlink. */
#define NEXTHOP_FLAG_MATCHED (1 << 4) /* Already matched vs a nexthop */
#define NEXTHOP_FLAG_DUPLICATE (1 << 5) /* nexthop duplicates another active one */
+#define NEXTHOP_FLAG_RNH_FILTERED (1 << 6) /* rmap filtered, used by rnh */
#define NEXTHOP_IS_ACTIVE(flags) \
(CHECK_FLAG(flags, NEXTHOP_FLAG_ACTIVE) \
&& !CHECK_FLAG(flags, NEXTHOP_FLAG_DUPLICATE))