Age | Commit message (Collapse) | Author |
|
2006-07-10 Paul Jakma <paul.jakma@sun.com>
* ospf_nsm.c: (ospf_nsm_event) Record state change timestamp
and event in nbr struct.
* ospf_neighbor.h: (struct ospf_neighbor) Add fields to record
timestamp of last NSM change and event.
* ospf_vty.c: (show_ip_ospf_neighbor_detail_sub) Print
last state change timestamp and event, if available.
|
|
2006-07-10 Paul Jakma <paul.jakma@sun.com>
* ospf_nsm.c: (nsm_notice_state_changes) Move state change
logging code to new func to declutter nsm_change_state and
ospf_nsm_event.
Log event with AdjChange, it's useful to know.
(nsm_change_state) move adjchange and snmp logging to previous.
(ospf_nsm_event) call nsm_notice_state_changes from here.
Move the debug message to entry of function, so it gets out
even if something goes wrong.
|
|
2006-07-10 Paul Jakma <paul.jakma@sun.com>
* ospf_nsm.c: (nsm_change_state) call nsm_clear_adj for all
adjacency losses, hence removing need for nsm_reset_nbr.
(nsm_reset_nbr) kill it, clear_adj in previous does fine.
(nsm_kill_nbr,nsm_start) remove nsm_reset_nbr call.
(ospf_nsm_event) Allow NSM function to be NULL, this along with
removal of nsm_reset_nbr, allows a bunch of now useless functiosn
to be removed.
Remove some useless variables.
(nsm_ignore) now useless, remove.
(nsm_bad_ls_req) ditto
(nsm_seq_number_mismatch) "
(nsm_oneway_received) "
(nsm_inactivity_timer) "
(nsm_ll_down) "
(NSM) replace removed action functions with NULL.
|
|
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.
|
|
2006-07-06 Paul Jakma <paul.jakma@sun.com>
* ospf_nsm.c: (ospf_nsm_event) LLDown event also results in nbr
being deleted, requires early-return too. Likely explains
some crash reports after interface events.
|
|
2006-07-04 Paul Jakma <paul.jakma@sun.com>
* ospf_nsm.c: (general) Various small cleanups from Andrew's
review of last set of patches.
(nsm_timer_set) Loading, Full and default can share
same code too.
(nsm_should_adj) Can just be one big OR.
(nsm_twoway_received) Collapse into return statement.
|
|
2006-07-02 Paul Jakma <paul.jakma@sun.com>
* ospf_nsm.c: (nsm_clear_adj) clear adjacency related state for a
neighbour, needed for some state changes from > ExStart down
to ExStart or less, which need not go through nsm_reset_nbr.
(nsm_reset_nbr) move code to former. Should be static.
(ospf_nsm_event) Remove long dead code.
Use nsm_clear_adj for state changes that take down
adjacencies to TwoWay/ExStart.
(nsm_kill_nbr) Oops, action function shouldn't try return
1 for error.
|
|
2006-07-02 Paul Jakma <paul.jakma@sun.com>
* ospf_nsm.c: (nsm_timer_set) ls_req timer should be OFF in
early states.
Compact several identical sections.
Set inactivity timer to OFF for Down, for documentary purposes.
|
|
2006-07-02 Paul Jakma <paul.jakma@sun.com>
* ospf_nsm.c: (ospf_nsm_event) Don't allow action functions to
change next_state if the NSM tables do not indicate
next_state is conditional, log warning if one tries -
existing code appears fine though.
|
|
2006-07-02 Paul Jakma <paul.jakma@sun.com>
* ospf_nsm.c: (nsm_should_adj) New function, just consolidate the
10.4 adjacency check from nsm_twoway_received/nsm_adj_ok.
(nsm_twoway_received/nsm_adj_ok) Use former.
|
|
2006-06-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospf_nsm.c: (nsm_twoway_received) When deciding whether to
change from state Init to ExStart, the test for whether the
neighboring router is DR or BDR should be against the
local router's notion of DR/BDR, not the neighbor's view.
|
|
2006-06-28 Erik Muller <erikm@internap.com>
* ospfd.h: Define 2 new struct ospf config flags:
OSPF_LOG_ADJACENCY_CHANGES and OSPF_LOG_ADJACENCY_DETAIL
* ospf_nsm.c (nsm_change_state): Log adjacency changes if
requested.
* ospf_vty.c (ospf_log_adjacency_changes): New command function
to implement ospf subcommand "log-adjacency-changes [detail]".
(no_ospf_log_adjacency_changes) Turn off log-adjacency-changes.
(show_ip_ospf) Show whether adjacency changes are logged.
(ospf_config_write) Add "log-adjacency-changes [detail]" to config.
(ospf_vty_init) Add ospf_log_adjacency_changes and
no_ospf_log_adjacency_changes.
* ospfd.texi: Document new ospf router subcommand
"log-adjacency-changes [detail]".
|
|
2006-04-03 Paul Jakma <paul.jakma@sun.com>
* (general) Fix issues with handling of Vlinks and entries
in the nbrs route-table which were highlighted by the
nsm/nbr_self fixes from bug #234. Many thanks to Juergen
Kammer for his help and efforts in testing out debug patches to
pinpoint the issue.
* ospf_interface.c: (ospf_vl_new) Add nbr_self for Vlink.
* ospf_neighbor.c: (ospf_nbr_key) new static function, helper
to create key in nbrs table for a given nbr.
(ospf_nbr_delete) Use ospf_nbr_key. Add an assert() to
document an expected state.
(ospf_nbr_add_self) Ditto.
(ospf_nbr_lookup_by_addr) Add an assert.
* ospf_nsm.c: (nsm_kill_nbr) Can never kill the nbr_self
psuedo-neighbour.
|
|
* (general) OSPF fast, sub-second hello and 1s dead-interval
support. A warning fix. Millisec support for ospf_timer_dump.
Change auto-cost ref-bandwidth to add a comment to write out
of config, rather than printing annoying messages to vty on
startup.
* ospf_dump.c: (ospf_timer_dump) Print out milliseconds too.
Callers typically specify a length of 9, so most see
millisecs unless they specify the additional length.
* ospf_interface.h: (struct ospf_interface) new interface param,
fast_hello.
* ospf_interface.c: (ospf_if_table_lookup) add brackets,
gcc warning fix.
(ospf_new_if_params) Initialise fast_hello param.
(ospf_free_if_params) Check whether fast_hello is configured.
(ospf_if_new_hook) set fast_hello to default.
* ospf_ism.h: Wrap OSPF_ISM_TIMER_ON inside do {} while (0) to
prevent funny side-effects from its if statement when this
macro is used conditionally by other macros.
(OSPF_ISM_TIMER_MSEC_ON) new macro, set in milliseconds.
(OSPF_HELLO_TIMER_ON) new macro to set hello timer according
to whether fast_hello is set.
* ospf_ism.c: Update all setting of the hello timer to use
either OSPF_ISM_TIMER_MSEC_ON or OSPF_HELLO_TIMER_ON. The
former is used when hello is to be sent immediately.
* ospf_nsm.c: ditto
* ospf_packet.c: (ospf_hello) hello-interval is not checked
for mismatch if fast_hello is set.
(ospf_read) Annoying nit, fix "no ospf_interface" to be debug
rather than a warning, as it can be perfectly normal to
receive packets when logical subnets are used.
(ospf_make_hello) Set hello-interval to 0 if fast-hellos are
configured.
* ospf_vty.c: (ospf_auto_cost_reference_bandwidth) annoying
nit, don't vty_out if this command is given, it gets tired
quick.
(show_ip_ospf_interface_sub) Print the hello-interval
according to whether fast-hello is set or not.
Print the extra 5 millisec characters from (ospf_timer_dump)
if fast-hello is configured.
(ospf_vty_dead_interval_set) new function, common to all
forms of dead-interval command, to set dead-interval and
fast-hello correctly. If a dead-interval is given, unset
fast-hello, else if a hello-multiplier is set, set
dead-interval to 1 and fast-hello to given multiplier.
(ip_ospf_dead_interval_addr_cmd) use
ospf_vty_dead_interval_set().
(ip_ospf_dead_interval_minimal_addr_cmd) ditto.
(no_ip_ospf_dead_interval) Unset fast-hello.
(no_ip_ospf_hello_interval) Bug-fix, unset of hello-interval
should set it to OSPF_HELLO_INTERVAL_DEFAULT, not
OSPF_ROUTER_DEAD_INTERVAL_DEFAULT.
(config_write_interface) Write out fast-hello.
(ospf_config_write) Write a comment about
"auto-cost reference-bandwidth" having to be equal on all
routers. Hopefully just as noticeable as old practice of
writing to vty, but less annoying.
(ospf_vty_if_init) install the two new dead-interval
commands.
* ospfd.h: Add defines for OSPF_ROUTER_DEAD_INTERVAL_MINIMAL
and OSPF_FAST_HELLO_DEFAULT.
|
|
* lib/smux.[ch]: allow to retreive global OID (identified by <0
namelen).
* ospf_ism.c: generate SNMP traps on Interface state change
* ospf_nsm.c: generate SNMP traps on Neighbour state change
* ospf_snmp.[ch]: support for SNMP traps for interface and neighbours.
|
|
[backport candidate]
|
|
* (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.
|
|
* ospf_packet.c: (ospf_db_desc) Should be static, not global.
(ospf_hello,ospf_db_desc,ospf_ls_upd,ospf_ls_ack) Improve warning
messages to include identifying information (e.g. router id).
* ospf_nsm.c: (nsm_change_state) Improve info message to include
router id and state names.
|
|
* *.c: Change level of debug messages to LOG_DEBUG.
|
|
|
|
|
|
* 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
|
|
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.
|
|
Date: Fri, 20 Dec 2002 17:58:43 +0900
From: Masahiko Endo <endo@suri.co.jp>
Reply-To: zebra@zebra.org
To: zebra@zebra.org
Cc: kunihiro@zebra.org
Subject: [zebra 16824] [PATCH] nsm_kill_neighbor
[ The following text is in the "ISO-2022-JP" character set. ]
[ Your display is set for the "ISO-8859-1" character set. ]
[ Some characters may be displayed incorrectly. ]
Hi Ishiguro-san,
Here is my problem analysis against the case that the ospfd crashes
when an interface is brought down.
When the ospfd receives a ZEBRA message "ZEBRA_INTERFACE_DOWN" from
zebra daemon, the ospfd performs bunch of ospf-interface cleanup for
the notified zebra-interface.
There are cases that neighbor instance "nbr", which will be removed
afterward, may scheduled in the NSM thread event queue. And when the
NSM event thread is fired, dereference for this already freed "nbr"
pointer causes SIGSEGV.
Please take a look at following timeline of processing sequences.
|