summaryrefslogtreecommitdiff
path: root/ospfd/ospf_interface.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-11-29 10:36:30 +0200
committerGitHub <noreply@github.com>2023-11-29 10:36:30 +0200
commitfc8a07433f64194aaa445e16e0854f3439247c89 (patch)
treee79394ba902f8788ba71ebdad7022028b601e686 /ospfd/ospf_interface.c
parentc3b314654e8a82d191a77b33211026ae5c67aab5 (diff)
parent5993c4aef923700bd606c4d105da39a3c66523c3 (diff)
Merge pull request #14886 from LabNConsulting/aceelindem/ospf-link-local-fix
ospfd: Fix OSPF link-local opaque LSA crash and opaque memory corruption
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r--ospfd/ospf_interface.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index 12337abcb3..0969ae15bd 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -339,6 +339,8 @@ void ospf_if_free(struct ospf_interface *oi)
assert(oi->state == ISM_Down);
+ ospf_opaque_type9_lsa_if_cleanup(oi);
+
ospf_opaque_type9_lsa_term(oi);
QOBJ_UNREG(oi);
@@ -380,26 +382,6 @@ int ospf_if_is_up(struct ospf_interface *oi)
return if_is_up(oi->ifp);
}
-struct ospf_interface *ospf_if_exists(struct ospf_interface *oic)
-{
- struct listnode *node;
- struct ospf *ospf;
- struct ospf_interface *oi;
-
- if (!oic)
- return NULL;
-
- ospf = oic->ospf;
- if (ospf == NULL)
- return NULL;
-
- for (ALL_LIST_ELEMENTS_RO(ospf->oiflist, node, oi))
- if (oi == oic)
- return oi;
-
- return NULL;
-}
-
/* Lookup OSPF interface by router LSA posistion */
struct ospf_interface *ospf_if_lookup_by_lsa_pos(struct ospf_area *area,
int lsa_pos)