]> git.puffer.fish Git - matthieu/frr.git/commit
isisd: detect Prefix-SID collisions and handle them appropriately
authorRenato Westphal <renato@opensourcerouting.org>
Sat, 24 Oct 2020 00:05:30 +0000 (21:05 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 4 Nov 2020 20:12:30 +0000 (17:12 -0300)
commit2f7cc7bcd3052a8687da8adffbed6aea5b71e90b
treed2d3153d7097fcb121265b571f870fbaffd0947b
parent28315916a2542052c7381d42900d6f16ed190c22
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>
isisd/isis_errors.c
isisd/isis_errors.h
isisd/isis_nb_config.c
isisd/isis_spf.c
isisd/isis_spf.h
isisd/isis_spf_private.h