From 97d2875e999487bfe91f16c77c409ac0080541d3 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 8 Mar 2023 21:38:18 +0100 Subject: Fixed bad filter re-evaluation with import table if filtered->accepted The import table feed wasn't resetting the table-specific route values like REF_FILTERED and thus made the route look like filtered even though it should have been re-evaluated as accepted. --- lib/route.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/route.h') diff --git a/lib/route.h b/lib/route.h index 50e62440..c8469163 100644 --- a/lib/route.h +++ b/lib/route.h @@ -46,6 +46,16 @@ static inline int rte_is_valid(rte *r) { return r && !(r->flags & REF_FILTERED); /* Route just has REF_FILTERED flag */ static inline int rte_is_filtered(rte *r) { return !!(r->flags & REF_FILTERED); } +/* Strip the route of the table-specific values */ +static inline rte rte_init_from(const rte *r) +{ + return (rte) { + .attrs = r->attrs, + .net = r->net, + .src = r->src, + }; +} + struct rte_src { struct rte_src *next; /* Hash chain */ struct rte_owner *owner; /* Route source owner */ -- cgit v1.2.3