summaryrefslogtreecommitdiff
path: root/isisd/isis_adjacency.c
diff options
context:
space:
mode:
authorzhou-run <zhou.run@h3c.com>2024-06-21 14:26:44 +0800
committerzhourun (RD) <zhou.run@h3c.com>2024-07-08 15:53:46 +0800
commitf54970ff43d6dc376081328614febb31f58df75d (patch)
treee3a18886d009f148279c6d8ab8c99deb0b9085ad /isisd/isis_adjacency.c
parent045029e2442dbca3b6e7685438d171fa05c0f968 (diff)
isisd: The neighbor entry still displays the deleted hostname of the neighbor
1. The lsp_update_data() function will check for the presence of the ISIS_TLV_DYNAMIC_HOSTNAME in the LSP, and then call isis_dynhn_insert() to add a hostname entry corresponding to the LSP ID. However, when the ISIS_TLV_DYNAMIC_HOSTNAME is not present in the LSP, the hostname entry corresponding to the LSP ID should also be deleted. 2. The command “show isis neighbor” invokes isis_adj_name() to display the System ID or hostname, but it does not check the area->dynhostname flag. 3. When the LSP expires and is removed, the corresponding hostname entry should also be deleted. 4. The TLV for LSP fragmentation will not contain the hostname and should be skipped. Signed-off-by: zhou-run <zhou.run@h3c.com>
Diffstat (limited to 'isisd/isis_adjacency.c')
-rw-r--r--isisd/isis_adjacency.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c
index 430bee92bf..ad63398715 100644
--- a/isisd/isis_adjacency.c
+++ b/isisd/isis_adjacency.c
@@ -293,7 +293,7 @@ const char *isis_adj_name(const struct isis_adjacency *adj)
struct isis_dynhn *dyn;
dyn = dynhn_find_by_id(adj->circuit->isis, adj->sysid);
- if (dyn)
+ if (adj->circuit->area->dynhostname && dyn)
return dyn->hostname;
snprintfrr(buf, sizeof(buf), "%pSY", adj->sysid);