From 69310a679aef2b532f6851298b453eb7ca4d3534 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 11 May 2005 18:09:59 +0000 Subject: 2005-05-11 Paul Jakma * (general) Fix memory leaks in opaque AS-scope LSAs, reported and with much debugging done by by scott collins . (possible backport candidate?) * ospf_lsa.c: (ospf_discard_from_db) dont call ospf_ase_unregister_external_lsa for opaque-lsa's, opaques are never registered with ase in the first place. * ospf_packet.c: (general) Disabuse opaque related code of its tendency to try gather up things into temporary lists. (ospf_ls_upd) remove the temporary lists opaque uses, call opaque functions inline, just like all other types. (ospf_ls_ack) ditto. (ospf_recv_packet) fixup sign warning. * ospf_opaque.c: (general) fix the unneeded use of lists, and untwist some of the logic. (ospf_opaque_self_originated_lsa_received) take a single LSA as argument, not a list of them. Remove the list loop. Logic otherwise unchanged. (ospf_opaque_ls_ack_received) Mostly ditto. But untwist the logic, move the actions up into the switch block, remove the goto's and sanitise the logic near the end a bit. * ospf_opaque.h: Adjust definitions of aforementioned functions in ospf_opaque.c to match. --- ospfd/ospf_opaque.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ospfd/ospf_opaque.h') diff --git a/ospfd/ospf_opaque.h b/ospfd/ospf_opaque.h index e33fb65b..fc8d6ff6 100644 --- a/ospfd/ospf_opaque.h +++ b/ospfd/ospf_opaque.h @@ -155,9 +155,9 @@ extern void ospf_opaque_adjust_lsreq (struct ospf_neighbor *nbr, struct list *lsas); extern void ospf_opaque_self_originated_lsa_received (struct ospf_neighbor *nbr, - struct list *lsas); + struct ospf_lsa *lsa); extern void ospf_opaque_ls_ack_received (struct ospf_neighbor *nbr, - struct list *acks); + struct ospf_lsa *lsa); extern void htonf (float *src, float *dst); extern void ntohf (float *src, float *dst); -- cgit v1.2.1