mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 12:36:20 +00:00
ospfd: ospf_ase.c, external_lsa locking fixes.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: Feng Lu <lu.feng@6wind.com> (cherry picked from commit fc363cd8a02ad1ac8a6ca57013fd8c531d45926a)
This commit is contained in:
parent
58a1e062da
commit
d8d939a61e
@ -723,6 +723,8 @@ ospf_ase_register_external_lsa (struct ospf_lsa *lsa, struct ospf *top)
|
|||||||
rn = route_node_get (top->external_lsas, (struct prefix *) &p);
|
rn = route_node_get (top->external_lsas, (struct prefix *) &p);
|
||||||
if ((lst = rn->info) == NULL)
|
if ((lst = rn->info) == NULL)
|
||||||
rn->info = lst = list_new();
|
rn->info = lst = list_new();
|
||||||
|
else
|
||||||
|
route_unlock_node (rn);
|
||||||
|
|
||||||
/* We assume that if LSA is deleted from DB
|
/* We assume that if LSA is deleted from DB
|
||||||
is is also deleted from this RT */
|
is is also deleted from this RT */
|
||||||
@ -743,13 +745,13 @@ ospf_ase_unregister_external_lsa (struct ospf_lsa *lsa, struct ospf *top)
|
|||||||
p.prefixlen = ip_masklen (al->mask);
|
p.prefixlen = ip_masklen (al->mask);
|
||||||
apply_mask_ipv4 (&p);
|
apply_mask_ipv4 (&p);
|
||||||
|
|
||||||
rn = route_node_get (top->external_lsas, (struct prefix *) &p);
|
rn = route_node_lookup (top->external_lsas, (struct prefix *) &p);
|
||||||
lst = rn->info;
|
|
||||||
|
|
||||||
/* XXX lst can be NULL */
|
if (rn) {
|
||||||
if (lst) {
|
lst = rn->info;
|
||||||
listnode_delete (lst, lsa);
|
listnode_delete (lst, lsa);
|
||||||
ospf_lsa_unlock (&lsa); /* external_lsas list */
|
ospf_lsa_unlock (&lsa); /* external_lsas list */
|
||||||
|
route_unlock_node (rn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user