summaryrefslogtreecommitdiffstats
path: root/isisd/isis_nb_config.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2024-07-09 05:00:35 +0200
committerGitHub <noreply@github.com>2024-07-09 05:00:35 +0200
commit893ba83ff335db96785f3d4bb96a0d7bec5b8081 (patch)
tree24c55f88f065f15d80a3b229d73fcda10b4d7eb7 /isisd/isis_nb_config.c
parentMerge pull request #16346 from pguibert6WIND/sharp_zapi_nexthop_only (diff)
parentisisd: When operating multiple areas, the system ID behaves abnormally. (diff)
downloadfrr-893ba83ff335db96785f3d4bb96a0d7bec5b8081.tar.xz
frr-893ba83ff335db96785f3d4bb96a0d7bec5b8081.zip
Merge pull request #16090 from zhou-run/202405271057
isisd: When operating multiple areas, the system ID behaves abnormally.
Diffstat (limited to 'isisd/isis_nb_config.c')
-rw-r--r--isisd/isis_nb_config.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/isisd/isis_nb_config.c b/isisd/isis_nb_config.c
index 30c90baa5..8926b624e 100644
--- a/isisd/isis_nb_config.c
+++ b/isisd/isis_nb_config.c
@@ -252,11 +252,12 @@ int isis_instance_area_address_destroy(struct nb_cb_destroy_args *args)
return NB_ERR_INCONSISTENCY;
listnode_delete(area->area_addrs, addrp);
- XFREE(MTYPE_ISIS_AREA_ADDR, addrp);
/*
* Last area address - reset the SystemID for this router
*/
- if (listcount(area->area_addrs) == 0) {
+ if (!memcmp(addrp->area_addr + addrp->addr_len, area->isis->sysid,
+ ISIS_SYS_ID_LEN) &&
+ listcount(area->area_addrs) == 0) {
for (ALL_LIST_ELEMENTS_RO(area->circuit_list, cnode, circuit))
for (lvl = IS_LEVEL_1; lvl <= IS_LEVEL_2; ++lvl) {
if (circuit->u.bc.is_dr[lvl - 1])
@@ -268,6 +269,8 @@ int isis_instance_area_address_destroy(struct nb_cb_destroy_args *args)
zlog_debug("Router has no SystemID");
}
+ XFREE(MTYPE_ISIS_AREA_ADDR, addrp);
+
return NB_OK;
}