summaryrefslogtreecommitdiff
path: root/ospfd/ospf_opaque.c
AgeCommit message (Collapse)Author
2010-12-08ospfd: Fix maxage/flush to not try flood twice, remember maxages for longerPaul Jakma
2006-05-30 Paul Jakma <paul.jakma@sun.com> * (general) Fix confusion around MaxAge-ing and problem with high-latency networks. Analysis and suggested fixes by Phillip Spagnolo, in [quagga-dev 4132], on which this commit expands slightly. * ospf_flood.{c,h}: (ospf_lsa_flush) new function. Scope-general form of existing flush functions, essentially the dormant ospf_maxage_flood() but without the ambiguity of whether it is responsible for flooding. * ospf_lsa.c: (ospf_lsa_maxage) Role minimised to simply setup LSA on the Maxage list and schedule removal - no more. ospf_lsa_flush* being the primary way to kick-off flushes of LSAs. Don't hardcode the remover-timer value, which was too short for very high-latency networks. (ospf_maxage_lsa_remover) Just do what needs to be done to remove maxage LSAs from the maxage list, remove the call to ospf_flood_through(). Don't hardcode remove-timer value. (ospf_lsa_{install,flush_schedule}) ospf_lsa_flush is the correct entrypoint to flushing maxaged LSAs. (lsa_header_set) Use a define for the initial age, useful for testing. * ospf_opaque.c: (ospf_opaque_lsa_refresh) ditto. (ospf_opaque_lsa_flush_schedule) ditto. * ospfd.h: ({struct ospf,ospf_new}) Add maxage_delay parameter, interval to wait before running the maxage_remover. Supply a suitable default. Add a define for OSPF_LSA_INITIAL_AGE, see lsa_header_set().
2006-07-26[ospfd] Allow ospf_lsa_unlock to NULL out callers' LSA pointers upon freePaul Jakma
2006-07-26 Paul Jakma <paul.jakma@sun.com> * ospf_lsa.{c,h}: (ospf_lsa_unlock) Change to take a double pointer to the LSA to be 'unlocked', so that, if the LSA is freed, the callers pointer to the LSA can be NULLed out, allowing any further use of that pointer to provoke a crash sooner rather than later. * ospf_*.c: (general) Adjust callers of ospf_lsa_unlock to match previous. Try annotate 'locking' somewhat to show which 'locks' are protecting what LSA reference, if not obvious. * ospf_opaque.c: (ospf_opaque_lsa_install) Trivial: remove useless goto, replace with return. * ospf_packet.c: (ospf_make_ls_ack) Trivial: merge two list loops, the dual-loop predated the delete-safe list-loop macro.
2005-09-172005-09-17 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* ospf_opaque.c: (ospf_opaque_lsa_refresh_schedule,ospf_opaque_lsa_flush_schedule) No need to call ospf_lookup(), just use lsa0->area->ospf instead.
2005-05-112005-05-11 Paul Jakma <paul.jakma@sun.com>paul
* (general) Fix memory leaks in opaque AS-scope LSAs, reported and with much debugging done by by scott collins <scollins@agile.tv>. (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.
2005-05-062005-05-06 Paul Jakma <paul.jakma@sun.com>paul
* (general) extern and static qualifiers added. unspecified arguments in definitions fixed, typically they should be 'void'. function casts added for callbacks. Guards added to headers which lacked them. Proper headers included rather than relying on incomplete definitions. gcc noreturn function attribute where appropriate. * ospf_opaque.c: remove the private definition of ospf_lsa's ospf_lsa_refresh_delay. * ospf_lsa.h: export ospf_lsa_refresh_delay * ospf_packet.c: (ospf_make_md5_digest) make *auth_key const, correct thing to do - removes need for the casts later. * ospf_vty.c: Use vty.h's VTY_GET_INTEGER rather than ospf_vty's home-brewed versions, shuts up several warnings. * ospf_vty.h: remove VTY_GET_UINT32. VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX moved to lib/vty.h. * ospf_zebra.c: (ospf_distribute_list_update_timer) hacky overloading of the THREAD_ARG pointer should at least use uintptr_t.
2005-04-072005-04-07 Paul Jakma <paul.jakma@sun.com>paul
* (global): Fix up list loops to match changes in lib/linklist, and some basic auditing of usage. * configure.ac: define QUAGGA_NO_DEPRECATED_INTERFACES * HACKING: Add notes about deprecating interfaces and commands. * lib/linklist.h: Add usage comments. Rename getdata macro to listgetdata. Rename nextnode to listnextnode and fix its odd behaviour to be less dangerous. Make listgetdata macro assert node is not null, NULL list entries should be bug condition. ALL_LIST_ELEMENTS, new macro, forward-referencing macro for use with for loop, Suggested by Jim Carlson of Sun. Add ALL_LIST_ELEMENTS_RO for cases which obviously do not need the "safety" of previous macro. LISTNODE_ADD and DELETE macros renamed to ATTACH, DETACH, to distinguish from the similarly named functions, and reflect their effect better. Add a QUAGGA_NO_DEPRECATED_INTERFACES define guarded section with the old defines which were modified above, for backwards compatibility - guarded to prevent Quagga using it.. * lib/linklist.c: fix up for linklist.h changes. * ospf6d/ospf6_abr.c: (ospf6_abr_examin_brouter) change to a single scan of the area list, rather than scanning all areas first for INTER_ROUTER and then again for INTER_NETWORK. According to 16.2, the scan should be area specific anyway, and further ospf6d does not seem to implement 16.3 anyway.
2004-12-09add comments about warningsgdt
2004-12-082004-12-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* *.c: Change level of debug messages to LOG_DEBUG.
2004-11-202004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* global: Replace strerror with safe_strerror. And vtysh/vtysh.c needs to include "log.h" to pick up the declaration.
2004-10-12Unbreak ospfclient compilation.hasso
2004-10-11Disable ospfapi init by default.hasso
2004-09-242004-09-24 Paul Jakma <paul@dishone.st>paul
* ospf_apiserver.{c,h}: lists typedef removal cleanup. update some list loops to LIST_LOOP. some miscellaneous indent fixups. (ospf_apiserver_unregister_opaque_type) fix listnode_delete of referenced node in loop. * ospf_interface.h: lists typedef removal cleanup. * ospf_opaque.{c,h}: lists typedef removal cleanup. update some list loops to LIST_LOOP. miscellaneous style and indent fixups. * ospf_te.{c,h}: ditto * ospf_packet.c: lists typedef removal cleanup.
2004-07-272004-07-27 Paul Jakma <paul@dishone.st>paul
* ospf_opaque.c: (ospf_opaque_lsa_flush_schedule) do not NULL out the LSA as then free_opaque_info_per_id() can never unlock (and free) the LSA. Reported by Gunnar Stigen.
2004-03-18Amir's fix case where opaque capability is switched "ON -> OFF -> ON".hasso
[quagga-dev 843]
2003-04-042003-04-04 Paul Jakma <paul@dishone.st>paul
* Sync to Zebra CVS * Fix lib/thread.h leak * Fix small Opaque LSA leak * Do not configure OSPF interfaces for secondary addresses * vtysh fixes from Hasso * Dave Watson's missing ntohs fix
2003-03-252003-03-25 Paul Jakma <paul@dishone.st>paul
* sync to latest zebra CVS * spec file: updated and added define for ospf-api/client NB: OSPF-API has been broken by the zebra.org changes, which has added struct ospf * as a new arg to many functions
2003-03-17Addition of OSPF-API - Amir Guindehi <amir@datacore.ch>paul
2003-01-18Date: Fri, 20 Dec 2002 17:28:45 +0900paul
From: Masahiko Endo <endo@suri.co.jp> Reply-To: zebra@zebra.org To: zebra@zebra.org Cc: kunihiro@zebra.org, yokota@kddlabs.co.jp Subject: [zebra 16823] [PATCH] Bugfix and new feature in Opaque-LSA handling. ----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- Changes 2002.12.20 1. Bug fixes 1.1 When an opaque LSA is being removed from (or added to) the LSDB, it does not mean a change in network topology. Therefore, SPF recalculation should not be triggered in that case. There was an assertion failure problem "assert (rn && rn->info)" inside the function "ospf_ase_incremental_update()", because the upper function "ospf_lsa_maxage_walker_remover()" called it when a type-11 opaque LSA is removed due to MaxAge. 1.2 Type-9 LSA is defined to have "link-local" flooding scope. In the Database exchange procedure with a new neighbor, a type-9 LSA was added in the database summary of a DD message, even if the link is different from the one that have bound to. 2. Feature enhancements 2.1 Though a "wildcard" concept to handle type-9/10/11 LSAs altogether has introduced about a year ago, it was only a symbol definition and actual handling mechanism was not implemented. Now it works.
2002-12-13Initial revisionpaul