summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_te.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-06-01 02:55:59 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-06-05 16:42:05 +0200
commit20a7c80cc2efa52fec7d029cc1ad52c037a0824c (patch)
treee9b04c74892b22a14006ece122c215202e7ba072 /ospfd/ospf_te.c
parentospfd: Note that we do not care about self origination in this case (diff)
downloadfrr-20a7c80cc2efa52fec7d029cc1ad52c037a0824c.tar.xz
frr-20a7c80cc2efa52fec7d029cc1ad52c037a0824c.zip
ospfd: lp may be null, make sure it isn't
We lookup the lp value and lookup_linkparams_by_instance can return NULL if something has gone terribly wrong. Make sure that lp is not NULL. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ospfd/ospf_te.c')
-rw-r--r--ospfd/ospf_te.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index 26df7a24c..2b1b32861 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -1451,6 +1451,8 @@ static struct ospf_lsa *ospf_mpls_te_lsa_refresh(struct ospf_lsa *lsa)
zlog_warn("ospf_mpls_te_lsa_refresh: Invalid parameter?");
lsa->data->ls_age =
htons(OSPF_LSA_MAXAGE); /* Flush it anyway. */
+ ospf_opaque_lsa_flush_schedule(lsa);
+ return NULL;
}
/* Check if lp was not disable in the interval */
@@ -1463,8 +1465,7 @@ static struct ospf_lsa *ospf_mpls_te_lsa_refresh(struct ospf_lsa *lsa)
/* If the lsa's age reached to MaxAge, start flushing procedure. */
if (IS_LSA_MAXAGE(lsa)) {
- if (lp)
- UNSET_FLAG(lp->flags, LPFLG_LSA_ENGAGED);
+ UNSET_FLAG(lp->flags, LPFLG_LSA_ENGAGED);
ospf_opaque_lsa_flush_schedule(lsa);
return NULL;
}