From 2f7cc7bcd3052a8687da8adffbed6aea5b71e90b Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 23 Oct 2020 21:05:30 -0300 Subject: 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 Signed-off-by: Renato Westphal --- isisd/isis_errors.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'isisd/isis_errors.c') diff --git a/isisd/isis_errors.c b/isisd/isis_errors.c index 7530d0b966..1d277ac5f1 100644 --- a/isisd/isis_errors.c +++ b/isisd/isis_errors.c @@ -43,6 +43,12 @@ static struct log_ref ferr_isis_err[] = { .description = "Isis has detected that a SID index falls outside of its associated SRGB range", .suggestion = "Configure a larger SRGB" }, + { + .code = EC_ISIS_SID_COLLISION, + .title = "SID collision", + .description = "Isis has detected that two different prefixes share the same SID index", + .suggestion = "Identify the routers that are advertising the same SID index and fix the collision accordingly" + }, { .code = END_FERR, } -- cgit v1.2.3