Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ospfd/ospf_te.c
Original file line number Diff line number Diff line change
Expand Up @@ -2246,6 +2246,10 @@ static int ospf_te_parse_te(struct ls_ted *ted, struct ospf_lsa *lsa)
}

/* Get corresponding Edge from Link State Data Base */
if (IPV4_NET0(attr.standard.local.s_addr) && !attr.standard.local_id) {
ote_debug(" |- Found no TE Link local address/ID. Abort!");
return -1;
}
edge = get_edge(ted, attr.adv, attr.standard.local);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we validate the "edge" instead of the above added check?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. In fact, the edge structure is correctly created. But, the unique identifier of the edge in the TED is based on the local address. Thus, if the local address is IPV4_NET0 (i.e. 0.0.0.0) we cannot correctly reference the edge in the TED. However, local ID is also a valid identifier. So, I need to check that both local address and local ID have not been found during TE parsing. I'll update the PR accordingly.

old = edge->attributes;

Expand Down