Skip to content

Commit

Permalink
Merge pull request FRRouting#18294 from Orange-OpenSource/isisd
Browse files Browse the repository at this point in the history
isisd: Correct edge insertion into TED
  • Loading branch information
donaldsharp authored Mar 3, 2025
2 parents dfc2f24 + 605fc1d commit 21a8f52
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions isisd/isis_te.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 21a8f52

Please sign in to comment.