Merge pull request #15440 from FRRouting/mergify/bp/stable/9.1/pr-15431

ospfd: Solved crash in OSPF TE parsing (backport #15431)
This commit is contained in:
Russ White 2024-02-27 14:16:23 -05:00 committed by GitHub
commit ac19b7c68a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2245,6 +2245,10 @@ static int ospf_te_parse_te(struct ls_ted *ted, struct ospf_lsa *lsa)
} }
/* Get corresponding Edge from Link State Data Base */ /* 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); edge = get_edge(ted, attr.adv, attr.standard.local);
old = edge->attributes; old = edge->attributes;