From d71ea65270408a45e4bec036671ec73b24b994b4 Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Tue, 22 Mar 2011 15:23:55 +0000 Subject: ospfd: Compile fix for opaque support * ospfd: Refresher logic cleanup broke OSPF opaque, which does its own thing with regard to refresher logic and which also, in the protocol, requires implementations to keep state of which OI an LSA is received on (rather than providing information in the LSA to allow it to be looked up - as other LSAs requiring such assocation were careful to do). * ospf_lsa.h: (struct ospf_interface) Add back the pointer to oi, but only for type-9 now. * ospf_nsm.c: (ospf_db_summary_add) check the oi actually exists first - doesn't obviate the need for opaque to ensure oi pointers get cleaned up when ospf_interfaces disappear. * ospf_opaque.{c,h}: (ospf_opaque_functab,ospf_opaque_lsa_refresh) Refresher LSA functions now need to return the LSA to the general refresh logic, to indicate whether the LSA was refreshed. --- 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 f49fe460..22730645 100644 --- a/ospfd/ospf_opaque.h +++ b/ospfd/ospf_opaque.h @@ -120,7 +120,7 @@ ospf_register_opaque_functab ( void (* config_write_debug )(struct vty *vty), void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa), int (* lsa_originator)(void *arg), - void (* lsa_refresher )(struct ospf_lsa *lsa), + struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa), int (* new_lsa_hook)(struct ospf_lsa *lsa), int (* del_lsa_hook)(struct ospf_lsa *lsa) ); @@ -143,7 +143,7 @@ extern void ospf_opaque_lsa_originate_schedule (struct ospf_interface *oi, int *init_delay); extern struct ospf_lsa *ospf_opaque_lsa_install (struct ospf_lsa *, int rt_recalc); -extern void ospf_opaque_lsa_refresh (struct ospf_lsa *lsa); +extern struct ospf_lsa *ospf_opaque_lsa_refresh (struct ospf_lsa *lsa); extern void ospf_opaque_lsa_reoriginate_schedule (void *lsa_type_dependent, u_char lsa_type, -- cgit v1.2.1