Skip to content

Commit

Permalink
Merge pull request #12269 from pguibert6WIND/ospf_external_lsa_crash
Browse files Browse the repository at this point in the history
ospfd: prevent from crashing when processing external lsa
  • Loading branch information
Jafaral authored Nov 10, 2022
2 parents e07ff2c + e5309c1 commit 2bb16f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ospfd/ospf_lsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -2205,7 +2205,7 @@ struct ospf_lsa *ospf_external_lsa_originate(struct ospf *ospf,
*/

if (ospf->router_id.s_addr == INADDR_ANY) {
if (IS_DEBUG_OSPF_EVENT)
if (ei && IS_DEBUG_OSPF_EVENT)
zlog_debug(
"LSA[Type5:%pI4]: deferring AS-external-LSA origination, router ID is zero",
&ei->p.prefix);
Expand All @@ -2214,7 +2214,7 @@ struct ospf_lsa *ospf_external_lsa_originate(struct ospf *ospf,

/* Create new AS-external-LSA instance. */
if ((new = ospf_external_lsa_new(ospf, ei, NULL)) == NULL) {
if (IS_DEBUG_OSPF_EVENT)
if (ei && IS_DEBUG_OSPF_EVENT)
zlog_debug(
"LSA[Type5:%pI4]: Could not originate AS-external-LSA",
&ei->p.prefix);
Expand Down

0 comments on commit 2bb16f6

Please sign in to comment.