summaryrefslogtreecommitdiffstats
path: root/isisd/isis_spf.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-10-24 02:05:30 +0200
committerRenato Westphal <renato@opensourcerouting.org>2020-11-04 21:12:30 +0100
commit2f7cc7bcd3052a8687da8adffbed6aea5b71e90b (patch)
treed2d3153d7097fcb121265b571f870fbaffd0947b /isisd/isis_spf.h
parentisisd: fix build errors when EXTREME_DEBUG is defined (diff)
downloadfrr-2f7cc7bcd3052a8687da8adffbed6aea5b71e90b.tar.xz
frr-2f7cc7bcd3052a8687da8adffbed6aea5b71e90b.zip
isisd: detect Prefix-SID collisions and handle them appropriately
isisd relies on its YANG module to prevent the same SID index from being configured multiple times for different prefixes. It's possible, however, to have different routers assigning the same SID index for different prefixes. When that happens, we say we have a Prefix-SID collision, which is ultimately a misconfiguration issue. The problem with Prefix-SID collisions is that the Prefix-SID that is processed later overwrites the previous ones. Then, once the Prefix-SID collision is fixed in the configuration, the overwritten Prefix-SID isn't reinstalled since it's already marked as installed and it didn't change. To prevent such inconsistency from happening, add a safeguard in the SPF code to detect Prefix-SID collisions and handle them appropriately (i.e. log a warning + ignore the Prefix-SID Sub-TLV since it's already in use by another prefix). That way, once the configuration is fixed, no Prefix-SID label entry will be missing in the LFIB. Reported-by: Emanuele Di Pascale <emanuele@voltanet.io> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_spf.h')
-rw-r--r--isisd/isis_spf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/isisd/isis_spf.h b/isisd/isis_spf.h
index 15d3ff927..a9a14fc75 100644
--- a/isisd/isis_spf.h
+++ b/isisd/isis_spf.h
@@ -53,6 +53,8 @@ struct isis_spftree *isis_spftree_new(struct isis_area *area,
const uint8_t *sysid, int level,
enum spf_tree_id tree_id,
enum spf_type type, uint8_t flags);
+struct isis_vertex *isis_spf_prefix_sid_lookup(struct isis_spftree *spftree,
+ struct isis_prefix_sid *psid);
void isis_spf_invalidate_routes(struct isis_spftree *tree);
void isis_spf_verify_routes(struct isis_area *area,
struct isis_spftree **trees);