From 6d1ae197d189d50e60279796441c6e74272ddc54 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sun, 1 Jan 2023 20:10:23 +0100 Subject: Nest: Fix several issues with pflags There were some confusion about validity and usage of pflags, which caused incorrect usage after some flags from (now removed) protocol- specific area were moved to pflags. We state that pflags: - Are secondary data used by protocol-specific hooks - Can be changed on an existing route (in contrast to copy-on-write for primary data) - Are irrelevant for propagation (not propagated when changed) - Are specific to a routing table (not propagated by pipe) The patch did these fixes: - Do not compare pflags in rte_same(), as they may keep cached values like BGP_REF_STALE, causing spurious propagation. - Initialize pflags to zero in rte_get_temp(), avoid initialization in protocol code, fixing at least two forgotten initializations (krt and one case in babel). - Improve documentation about pflags --- proto/pipe/pipe.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'proto/pipe') diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c index 1f1ad857..a4c5b1d4 100644 --- a/proto/pipe/pipe.c +++ b/proto/pipe/pipe.c @@ -77,13 +77,6 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o a->cached = 0; a->hostentry = NULL; e = rte_get_temp(a, src); - e->pflags = new->pflags; - -#ifdef CONFIG_BGP - /* Hack to cleanup cached value */ - if (e->src->proto->proto == &proto_bgp) - e->pflags &= ~(BGP_REF_STALE | BGP_REF_NOT_STALE); -#endif } else { -- cgit v1.2.3