summaryrefslogtreecommitdiff
path: root/ospfd/ospf_nsm.h
AgeCommit message (Collapse)Author
2010-12-08ospfd: Reset neighbour inactivity timer for any packet arrivalPaul Jakma
* The hello protocol monitors connectivity in 2 different ways: a) local -> remote b) remote -> local Connectivity is required in both directions (2-way) for adjacencies to form. The first requires a round-trip to detect, and is done by advertising which other hosts a router knows about in its hello messages. This allows a host to detect which other routers are and are not receiving its message. If a remote neighbour delists the local router, then the local router raises a "1-Way Received" event. The latter is straight-forward, and is detected by setting a timer for the neighbour. If another Hello packet is not received within this time then the neighbour is dead, and a separate "Inactive" event is raised. These are 2 different and relatively independent measures. Knowing that we can optimise the 2nd, remote->local measure and reset the timer when /any/ packet arrives from that neighbour. For any packet is as good as a Hello packet. This can help in marginal situations, where the number of protocol messages that must be sent sometimes can exceed the capacity of the network to transmit the messages within the configured dead-time. I.e. an OSPF network with lots of LSAs, slow links and/or slow hosts (e.g. O(10k) LSAs, O(100kbit) links, embedded CPUs, and O(10s) dead-times). This optimisation allows an OSPF network to run closer to this margin, and/or allows networks to perhaps better cope with rare periods of exceptional load, where otherwise they would not. It's fully compatible with plain OSPF implementations and doesn't prejudice dead-neighbour detection. * ospf_nsm.h: Rename HelloReceived event to PacketReceived. * ospf_nsm.c: (nsm_hello_received) -> nsm_packet_received * ospf_packet.c: Schedule PacketReceived whenever a valid message is received.
2006-07-10[ospfd] cleanup NSM neighbour delete through a new Deleted NSM statePaul Jakma
2006-07-07 Paul Jakma <paul.jakma@sun.com> * ospf_nsm.h: Add a NSM_Deleted neighbour state, to act as dummy state indicating the neighbour is to be deleted. * ospf_nsm.c: (general) Use the NSM_Deleted state to delete neighbours, thus allowing code to be slightly more obvious in its flow. (nsm_timer_set) Add NSM_Deleted. Add another timer the code missed. (nsm_kill_nbr) No need for special case call to nsm_change_state anymore. Make the assert and error-handling for same case more readable (Andrew Schorr) Remove the call to ospf_nbr_delete, nsm_change_state can do this generally now via NSM_Deleted. (struct ... NSM) Add the dummy NSM_Deleted state, the 3 events that can lead to nsm_kill_nbr all now transition the NBR to NSM_Deleted and the general change_state function can be left to do the work. (ospf_nsm_event) Special casing of events and early-return can be removed now. On transition into Deleted, delete the nbr. * ospf_dump.c: (ospf_nsm_state_msg) Add Deleted.
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.
2002-12-13Initial revisionpaul