Skip to content

Commit

Permalink
isisd: When operating multiple areas, the system ID behaves abnormally.
Browse files Browse the repository at this point in the history
When clearing the net in one of the areas, the system ID is unconditionally cleared, even if the net does not include the current system ID.

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

isisd: When operating multiple areas, the system ID behaves abnormally.

When deleting one of the areas, even if the net under the area includes the current system ID, the system ID still remains.

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

isisd: fix frrbot styling issues found

fix frrbot styling issues found

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

isisd: fix frrbot styling issues found

fix frrbot styling issues found

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

isisd: Resolve compilation issues.

The higher version updates 'struct area_addr' to 'struct iso_address'.

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>

isisd: fix frrbot styling issues found

fix frrbot styling issues found

Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>
zhou-run authored and baozhen-H3C committed May 27, 2024
1 parent ebdbb0e commit 1f5446d
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 5 additions & 2 deletions isisd/isis_nb_config.c
Original file line number Diff line number Diff line change
@@ -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;
}

10 changes: 10 additions & 0 deletions isisd/isisd.c
Original file line number Diff line number Diff line change
@@ -496,6 +496,7 @@ void isis_area_destroy(struct isis_area *area)
{
struct listnode *node, *nnode;
struct isis_circuit *circuit;
struct iso_address *addr;

QOBJ_UNREG(area);

@@ -545,6 +546,15 @@ void isis_area_destroy(struct isis_area *area)
if (!CHECK_FLAG(im->options, F_ISIS_UNIT_TEST))
isis_redist_area_finish(area);

if (listcount(area->area_addrs) > 0) {
addr = listgetdata(listhead(area->area_addrs));
if (!memcmp(addr->area_addr + addr->addr_len, area->isis->sysid,
ISIS_SYS_ID_LEN)) {
memset(area->isis->sysid, 0, ISIS_SYS_ID_LEN);
area->isis->sysid_set = 0;
}
}

list_delete(&area->area_addrs);

for (int i = SPF_PREFIX_PRIO_CRITICAL; i <= SPF_PREFIX_PRIO_MEDIUM;

0 comments on commit 1f5446d

Please sign in to comment.