summaryrefslogtreecommitdiffstats
path: root/isisd/isis_events.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-10-30 02:15:24 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2021-10-30 02:17:49 +0200
commit2f9a06f0600b6d1c6f28117bb2846ce3675fc129 (patch)
tree86b32a67b482bc9f1157c98c2b194c6f209604f7 /isisd/isis_events.c
parentisisd: simplify check to forbid area-tag modification (diff)
downloadfrr-2f9a06f0600b6d1c6f28117bb2846ce3675fc129.tar.xz
frr-2f9a06f0600b6d1c6f28117bb2846ce3675fc129.zip
isisd: fix circuit is-type configuration
Currently, we have a lot of checks in CLI and NB layer to prevent incompatible IS-types of circuits and areas. All these checks become completely meaningless when the interface is moved between VRFs. If the area IS-type is different in the new VRF, previously done checks mean nothing and we still end up with incorrect circuit IS type. To actually prevent incorrect IS type, all checks must be done in the processing code. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'isisd/isis_events.c')
-rw-r--r--isisd/isis_events.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/isisd/isis_events.c b/isisd/isis_events.c
index 0b987fc5c..26c68db76 100644
--- a/isisd/isis_events.c
+++ b/isisd/isis_events.c
@@ -128,7 +128,7 @@ static void circuit_resign_level(struct isis_circuit *circuit, int level)
void isis_circuit_is_type_set(struct isis_circuit *circuit, int newtype)
{
- if (circuit->state != C_STATE_UP) {
+ if (!circuit->area) {
circuit->is_type = newtype;
return;
}
@@ -151,6 +151,11 @@ void isis_circuit_is_type_set(struct isis_circuit *circuit, int newtype)
return;
}
+ if (circuit->state != C_STATE_UP) {
+ circuit->is_type = newtype;
+ return;
+ }
+
if (!circuit->is_passive) {
switch (circuit->is_type) {
case IS_LEVEL_1: