summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2025-03-04 09:37:42 -0500
committerGitHub <noreply@github.com>2025-03-04 09:37:42 -0500
commit2889b3dac46a64561c22d2544839aeeb7426716d (patch)
tree58d10dbf6906773857ce15b67a3d011b7e2e74fd
parent07798136ccb757cbd8f1964dba80c3581353c911 (diff)
parent4c8bf32550064ee40d582156ad70fa61b7129019 (diff)
Merge pull request #18298 from FRRouting/mergify/bp/stable/10.1/pr-18294
isisd: Correct edge insertion into TED (backport #18294)
-rw-r--r--isisd/isis_te.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/isisd/isis_te.c b/isisd/isis_te.c
index d854123647..0e933a6eba 100644
--- a/isisd/isis_te.c
+++ b/isisd/isis_te.c
@@ -1193,32 +1193,18 @@ static int lsp_to_edge_cb(const uint8_t *id, uint32_t metric, bool old_metric,
" |- Link Edge (Unknown) to destination vertex (%s)",
print_sys_hostname(id));
+ /* Then search if there is a reverse Edge to link them */
dst = ls_find_edge_by_destination(args->ted, edge->attributes);
if (dst) {
/* Attach remote link if not set */
- if (edge->source && dst->destination == NULL) {
- vertex = edge->source;
- if (vertex->incoming_edges)
- listnode_add_sort_nodup(vertex->incoming_edges,
- dst);
+ if (dst->destination == NULL) {
+ listnode_add_sort_nodup(vertex->incoming_edges, dst);
dst->destination = vertex;
}
/* and destination vertex to this edge if not set */
- if (dst->source && edge->destination == NULL) {
- vertex = dst->source;
- if (vertex->incoming_edges)
- listnode_add_sort_nodup(vertex->incoming_edges,
- edge);
- edge->destination = vertex;
- }
- } else {
- /* Search dst. Vertex by Extended Reach. ID if not found */
if (edge->destination == NULL) {
- vertex = ls_find_vertex_by_key(args->ted,
- sysid_to_key(id));
- if (vertex && vertex->incoming_edges)
- listnode_add_sort_nodup(vertex->incoming_edges,
- edge);
+ vertex = dst->source;
+ listnode_add_sort_nodup(vertex->incoming_edges, edge);
edge->destination = vertex;
}
}