summaryrefslogtreecommitdiff
path: root/ospfd
AgeCommit message (Collapse)Author
2006-06-27[ospfd] Replace redistribution strings with new route_types.h defines.Paul Jakma
2006-05-23 Paul Jakma <paul.jakma@sun.com> * ospf_vty.c: (general) Replace in-place route redistribution command and help strings with the new auto-generated defines from lib/route_types.h
2006-06-26[ospfd] NSSA translate-enabled ABR should declare itself as ASBRPaul Jakma
2006-06-26 Paul Jakma <paul.jakma@sun.com> * ospf_abr.c: (general) NSSA translate-candidate ABRs need to be ASBRs, or other routers may rightfully refuse to install translated type-5s LSAs. reported by dendroot@gmail.com. (ospf_abr_nssa_check_status) Detect change in translator state when ABR, and inc/dec redistribute count as when we leave/enter the disabled state - so that translate-enabled ABR properly sets ASBR bit on non-NSSA areas. Run the resulting function through indent to clean it up. * ospf_lsa.c: (router_lsa_flags) For purposes of ASBR bit, NSSA area is same as stub area.
2006-06-24[ospfd] Improve two info log messages in ospf_snmp.cAndrew J. Schorr
2006-06-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * ospf_snmp.c: (ospfTrapNbrStateChange, ospfTrapIfStateChange) Improve info log message to indicate why the trap is being sent.
2006-06-24[ospfd] When writing out config, show "debug ospf nsm status" properlyAndrew J. Schorr
2006-06-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * ospf_dump.c: (config_write_debug) Fix typo to show debug ospf nsm status properly (not ism status).
2006-06-18[ospfd] Fix ospf passive-interface subcommand to create interface if necessaryAndrew J. Schorr
2006-06-17 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * ospf_vty.c: ({no_,}ospf_passive_interface) Replace if_lookup_by_name with a call to if_get_by_name -- if the interface does not exist already, it should be created. And remove the obsolete warning message.
2006-06-15[ospfd] Fix multicast membership drop bugPaul Jakma
2006-06-15 Paul Jakma <paul.jakma@sun.com> * Reported by Milan Koci * ospf_interface.h: (struct ospf_if_info) Add reference counts for multicast group memberships. Add various macros to help manipulate/check membership state. * ospf_interface.c: (ospf_if_set_multicast) Maintain the ospf_if_info reference counts, and only actually drop memberships if it hits 0, to avoid losing membership when OSPF is disabled on an interface with multiple active OSPF interfaces. * ospf_packet.c: (ospf_{hello,read}) Use the new macros to check/set multicast membership. * ospf_vty.c: (show_ip_ospf_interface_sub) ditto.
2006-06-15[ospfd] lsdb_delete/discard_from_db should be more robust to bad argsPaul Jakma
2006-05-31 Paul Jakma <paul.jakma@sun.com> * ospf_lsdb.c: (ospf_lsdb_delete) robustify against NULL arguments, print warning. * ospf_lsa.c: (ospf_discard_from_db) ditto. (ospf_maxage_lsa_remover) Check lsa->lsdb for validity, possible mitigation (but not solution) for bug #269.
2006-06-15[ospfd] suppres mostly uninteresting debug message unless debug is setPaul Jakma
2006-05-30 Paul Jakma <paul.jakma@sun.com> * ospf_packet.c: (ospf_read) Debug message about packets received on unenabled interfaces should be conditional on debug being set.
2006-05-12[ospfd] Fix small error in CID #13 commitPaul Jakma
2006-05-13 Paul Jakma <paul.jakma@sun.com> * ospf_lsa.c: (ospf_translated_nssa_refresh) fix the sanity check to match the assert, small error in CID #13 fix.
2006-05-12[ospfd] CID #13, debug for NULL type7 LSA should not print out data from itPaul Jakma
2006-05-12 Paul Jakma <paul.jakma@sun.com> * ospf_lsa.c: (ospf_translated_nssa_refresh) Add non-assert sanity check, in case DEBUG isn't defined. Debug message when no type7 exists should print the ID from the type5, not the type7, fixes CID #13.
2006-05-12[ospfd] CID #15, remove redundant NULL check in ism_change_statePaul Jakma
2006-05-12 Paul Jakma <paul.jakma@sun.com> * ospf_ism.c: (ism_change_state) NULL check on oi->area is useless, it's always valid. Only possibility where it couldn't be is if there is a race between abr_task and cleaning up oi's, in which case a NULL check here isn't going to do anything. Fixes CID #15.
2006-05-12[ospfd] CID #14, NULL check ospf->backbone before use, ospf_update_router_routePaul Jakma
2006-05-12 Paul Jakma <paul.jakma@sun.com> * ospf_ia.c: (ospf_update_router_route) ospf->backbone could be NULL when passed to ospf_find_asbr_route_through_area, check for NULL first, CID #14.
2006-05-12[ospfd] CID #28, remove another ospf_lookup call - ospf_redistribute_withdrawPaul Jakma
2006-05-12 Paul Jakma <paul.jakma@sun.com> * ospf_asbr.c: (ospf_redistribute_withdraw) remove ospf_lookup call by taking the struct ospf * as argument, which the caller has, fixing CID #28. * ospf_asbr.h: (ospf_redistribute_withdraw) update declaration * ospf_zebra.c: (ospf_redistribute_unset) update call to ospf_redistribute_withdraw to match.
2006-05-12[ospfd] CID #27, fix missing NULL return checkPaul Jakma
2006-05-12 Paul Jakma <paul.jakma@sun.com> * ospf_interface.c: (ospf_if_exists) Fix missing NULL return check on ospf_lookup, CID #27.
2006-05-12[ospfd] CID #29, fix missing NULL check by removing unused code.Paul Jakma
2006-05-12 Paul Jakma <paul.jakma@sun.com> * ospf_lsa.c: (ospf_lsa_action) Get rid of the ospf_lookup call, which is not checked for NULL return, by stripping out functionality which is never used, hence fixing Coverity CID #29. (struct lsa_action) remove unused member.
2006-05-12[ospfd] Squash another ospf_lookup callPaul Jakma
2006-05-11 Paul Jakma <paul.jakma@sun.com> * ospf_lsa.c: (ospf_default_originate_timer) Let the thread take (struct ospf *) as thread argument, rather than (struct ospf *)->default_originate, thus avoiding having to call ospf_lookup. * ospf_zebra.c: (ospf_redistribute_default_set) change setup of ospf_default_originate_timer thread to match. * ospfd.c: (ospf_router_id_update) ditto.
2006-05-12[ospfd] Fix leak in area-range-cost command, CID #46.Paul Jakma
2006-05-11 Paul Jakma <paul.jakma@sun.com> * ospf_abr.c: (ospf_area_range_cost_set) Shouldn't create a new range, should just lookup to see if one exists, the new range is just leaked. Fixes CID #46.
2006-05-12[ospfd] CID #49, fix dereference before NULL checkPaul Jakma
2006-05-11 Paul Jakma <paul.jakma@sun.com> * ospf_route.c: (ospf_route_delete_same_ext) Fix deref before NULL check by moving into check-protected block, fix CID #49.
2006-05-11[ospfd] Check NULL result from ospf_area_lookup_by_area_id, CID #69Paul Jakma
2006-05-11 Paul Jakma <paul.jakma@sun.com> * ospf_vty.c: (no_ospf_area_filter_list) Check NULL result from ospf_area_lookup_by_area_id, fixes Coverity CID #69
2006-05-11[ospfd] Fix missing check for ospf_lookup NULL return, CID #70Paul Jakma
2006-05-11 Paul Jakma <paul.jakma@sun.com> * ospf_vty.c: (general) Audit ospf_lookup calls in commands, ensure check for NULL result, make vty messages consistent. (show_ip_ospf_interface) Missing NULL check on ospf_lookup result, fixes Coverity CID #70.
2006-05-04[ospfd] Fix SPF of virtual-linksPaul Jakma
2006-04-24 Paul Jakma <paul.jakma@sun.com> * (general) More Virtual-link fixes, again with much help in testing / debug from Juergen Kammer. Primarily in SPF. * ospf_spf.h: Add guard. ospf_interface.h will include this header. * ospf_interface.h: Modify ospf_vl_lookup definition to take struct ospf as argument, so as to allow for NULL area argument. (struct ospf_vl_data) Remove out_oi, instead add a struct vertex_nexthop, to use as initial nexthop for backbone paths through a vlink. * ospf_interface.c: (ospf_vl_lookup) Modified to allow NULL area to be passed to indicate "any" (first) area. Add extra debug. (ospf_vl_set_params) vl_oi -> nexthop. Add extra debug. (ospf_vl_up_check) Fix debug, inet_ntoa returns a static buffer.. * ospf_route.c: (ospf_intra_add_router) Vlinks dont go through backbone, don't bother checking. * ospf_spf.c: (static struct list vertex_list) Record vertices that will need to be freed. (cmp) Order network before router vertices, as required, wasn't implemented. (vertex_nexthop_free) Mild additional robustness check. (vertex_parent_free) Take void argument, as this function is passed as list deconstructor for vertex parent list. (ospf_vertex_new) More debug. Set deconstructor for parent list. Track allocated vertices on the vertex_list. (ospf_vertex_free) Get rid of the tricky recursive cleanup of vertices. Now frees only the given vertex. (ospf_vertex_add_parent) Fix assert. (ospf_nexthop_calculation) Fix calculation of nexthop for VLink vertices, lookup the vl_data and use its previously recorded nexthop information. (ospf_spf_calculate) Vertices are freed simply by deleting vertex_list nodes and letting ospf_vertex_free as deconstructor work per-node. (ospf_spf_calculate_timer) Trivial optimisation, leave backbone SPF calculation till last to reduce SPF churn on VLink updates. * ospf_vty.c: (ospf_find_vl_data) update call to ospf_vl_lookup (no_ospf_area_vlink_cmd) ditto. (show_ip_ospf_interface_sub) For Vlinks, the peer address is more interesting than the output interface.
2006-04-03[ospfd] Fix virtual-link handling in nbrs route-table, exposed by bug#234 fixPaul Jakma
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.
2006-03-30[ospfd] Fix failure of Fletcher checksum with certain compilersPaul Jakma
2006-03-27 Paul Jakma <paul.jakma@sun.com> * ospf_lsa.c: (ospf_lsa_checksum) Add an explicit cast to avoid the ambiguities of ANSI and C99 C with respect to type conversion. Detailed problem report and test case with example data supplied by Dmitry Ivanov <dimss@telecentrs.lv>.
2006-03-30[ospfd] ignore loopbacks for received interface validationPaul Jakma
2006-03-25 Paul Jakma <paul.jakma@sun.com> * ospf_interface.c: (ospf_if_lookup_recv_if) Ignore loopbacks, we can never ever receive packets on those. Should fix case where CARP is run with address in same subnet as real interface. Problem report and diagnosis thanks to: Landon Fuller <landonf@opendarwin.org>. However, ospf_read() still can't deal deterministically with multiple interfaces in same subnet.
2006-03-30[ospfd] Fix incorrect byte-order conversion of OSPF_MAX_SEQUENCE_NUMBERPaul Jakma
2006-03-23 Steve Lawson <steve.lawson@aheadcomusa.com> * ospf_lsa.c: (ospf_lsa_install) Fix incorrect byte-order conversion of OSPF_MAX_SEQUENCE_NUMBER
2006-01-19[compiler] miscellaneous trivial compiler warning fixespaul
2006-01-19 Paul Jakma <paul.jakma@sun.com> * (general) various miscellaneous compiler warning fixes. Remove redundant break statements from switch clauses which return. return from main, not exit, cause it annoys SOS. Remove stray semi-colons which cause empty-statement warnings. * zebra/main.c: (sighup) remove private declaration of external function.
2006-01-18[ospfd] Add support for oversized LSAs.paul
2006-01-18 Juergen Kammer <j.kammer@eurodata.de> * ospf_lsa.c: (ospf_router_lsa_new) dont take reference to the stream data until it is constructed, data reference is volatile due to the potential resize in link_info_set 2006-01-18 Paul Jakma <paul.jakma@sun.com> * ospf_lsa.c: (link_info_set) Resize the stream if required and possible. Return number of links added. (lsa_link_*_set) use return value from previous. * ospf_lsa.h: Add OSPF_ROUTER_LSA_LINK_SIZE define.
2006-01-17[ospfd/zserv] adjust to new formatpaul
2006-01-17 Paul Jakma <paul.jakma@sun.com> * ospf_packet.c: (ospf_verify_header) print out the types involved if there's a mismatch. * ospf_zebra.c: (ospf_zebra_add) Adjust to new zserv format.
2006-01-11[ospfd] Bug #234. Fix nbr_self reinitialisation after down/up.paul
2006-01-10 Len Sorensen <lennartsorensen@ruggedcom.com> * (general) Bug #234, see also [quagga-dev 3902]. Fix problem with nbr_self not being properly reinitialised when an interface comes up, after having been down. Some re-arrangement done by Paul Jakma, any bugs introduced on top of Len's suggested changes are his. * ospf_neighbor.c: (ospf_nbr_add_self) centralise initialisation of nbr_self parameters here. * ospf_interface.c: (ospf_if_new) deleting initialisation of parameters of nbr_self, just rely on call to ospf_nbr_add_self. (ospf_if_cleanup) ditto. * ospfd.c: (ospf_network_run) ditto.
2006-01-10[ospfd] fix undefined effect expressionpaul
2006-01-10 Juris Kalnins <juris@mt.lv> * ospf_packet.c: (ospf_make_md5_digest) fix odd, if not undefined effect, assignment of an increment expression.
2006-01-10[ospfd] fix rare leak of struct connected, in an error path.paul
2006-01-10 Juris Kalnins <juris@mt.lv> * ospf_zebra.c: (ospf_interface_address_delete) fix rare leak of struct connected in an error case.
2006-01-10[ospfd] trim redundant stringspaul
2006-01-10 Paul Jakma <paul.jakma@sun.com> * ospf_vty.c: (config_write_ospf_distribute) trim down redundant strings.
2006-01-10[ospfd] fix automatic router-id and network enable bug.paul
2006-01-10 Paul Jakma <paul.jakma@sun.com> * ospfd.c: (ospf_network_run) checking to see if router-id is set should be on ospf->router_id, not router_id_static. This was causing ospfd to not start if router-id had not been configured statically. (ospf_if_update) ditto.
2005-11-26[ospfd] rename graceful to deferred, fix a tiny compile warning.paul
2005-11-26 Paul Jakma <paul.jakma@sun.com> * (general) s/graceful/deferred/ in all files, the former term is confusing wrt OSPF Graceful-Restart. * ospfd.c: (ospf_deferred_shutdown_check) dont return a function which returns void. SOS complains about this. (ospf_finish)
2005-11-26[c99] change gcc zero-length array to C99 flexible array declarationpaul
2005-11-26 Paul Jakma <paul.jakma@sun.com> * buffer.c: (struct buffer_data) change gcc zero array declaration to C99 incomplete array. * stream.h: (struct stream) same * ospf_api.c: (struct opaque_lsa) same
2005-11-202005-11-20 Paul Jakma <paul.jakma@sun.com>paul
* ospf_abr.c: (ospf_abr_announce_network_to_area) check returned LSA of ospf_summary_lsa_refresh and print warning if it failed. (ospf_abr_announce_network_to_area) similar (ospf_abr_announce_rtr_to_area) similar * ospf_lsa.c: (ospf_router_lsa_new) check LSA returned is valid. (ospf_router_lsa_originate) similar (ospf_router_lsa_refresh, ospf_network_lsa_new) similar (ospf_summary_lsa_new) Check ID is valid. (ospf_summary_lsa_originate) ditto, and check returned LSA from previous function is !NULL. (ospf_summary_lsa_refresh) check ospf_summary_lsa_new return is !NULL. (ospf_summary_asbr_lsa_new) ID valid check. (ospf_summary_asbr_lsa_originate) similar.
2005-11-202005-11-20 Paul Jakma <paul.jakma@sun.com>paul
* ospfd.h: remove the OSPF_ROUTER_ID_UPDATE_DELAY define (struct ospf) remove the router_id timer thread. remove export of ospf_router_id_update_timer. * ospfd.c: (ospf_router_id_update) call ospf_if_update to poke interfaces into action after ID has been configured. (ospf_router_id_update_timer) removed. (ospf_finish_final) t_router_id_update timer is gone. (ospf_network_run) router-id update timer gone. call ospf_router_id_update directly if ID not configured. In the per-iface loop, don't ospf_if_up interfaces if ID is still not configured. The update function will call ospf_if_update anyway. (ospf_if_update) ID update timer is gone. Just return if no ID is set. * ospf_vty.c: (ospf_router_id) call ospf_router_id_update, no timer needed. * ospf_zebra.c: (ospf_router_id_update_zebra) call ospf_router_id_update directly, not via timer.
2005-11-16[ospfd] Standardize buffer sizes used for displaying timers.ajs
2005-11-16 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * ospf_dump.h: Define OSPF_TIME_DUMP_SIZE as appropriate buffer size for use with ospf_timer_dump and ospf_timeval_dump. * ospf_vty.c: Change all buffer sizes used with ospf_timer_dump and ospf_timeval_dump to have size OSPF_TIME_DUMP_SIZE. (show_ip_ospf_interface_sub) Fix possible buffer overflow in call to ospf_timer_dump.
2005-11-16[ospfd] Make OSPF_ISM_TIMER_OFF macro safer.ajs
2005-11-16 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * ospf_ism.h: (OSPF_ISM_TIMER_OFF) Improve macro syntax by enclosing in 'do {...} while(0)'.
2005-11-14[ospfd] misc small fixes. Fix default stub router setting. no opaque compile.paul
2005-11-14 Paul Jakma <paul.jakma@sun.com> * ospfd.c: (ospf_new) stub-shutdown should just default to unconfigured, too strange otherwise. (ospf_finish_final) t_opaque_lsa_self TIMER_OFF should be preprocessor conditional on HAVE_OPAQUE_LSA. * ospfd.h: (struct ospf) remove the SHUTDOWN_DEFAULT define. no longer used, plus it wasn't in range that the command accepted. * ospf_zebra.h: Depends on vty.h, include it.
2005-11-11[ospfd] SPF ospf_canonical_nexthops_free bugfix.paul
2005-11-042005-11-04 Paul Jakma <paul.jakma@sun.com>paul
* ospf_{dump,spf,vty}.c: Oops, use the internal tv_sub function rather than unportable timersub.
2005-11-032005-11-03 Paul Jakma <paul.jakma@sun.com>paul
* ospf_packet.c: Change level of some warnings to informational.
2005-11-032005-11-03 Paul Jakma <paul.jakma@sun.com>paul
* ospf_apiserver.c: (apiserver_sync_callback) stray semi-colon * ospf_packet.c: include checksum.h, remove the in_cksum extern * prototypes. * ospf_te.h: Add braces, quell warning.
2005-10-292005-10-29 Paul Jakma <paul.jakma@sun.com>paul
* (general) RFC3137 stub-router support * ospfd.h: Add OSPF_OUTPUT_COST_INFINITE define. (struct ospf_master) Add a OSPF_MASTER_SHUTDOWN flag for options, to allow shutdown to distinguish between complete shutdown and shutdown of a subset of ospf instances. (struct ospf) Add stub_router_{startup,shutdown_}time, configuration of startup and shutdown time for stub-router. Add t_graceful_shutdown struct thread, timer for graceful shutdown, if needed. (struct ospf_area) Add stub_router_state - run time state of stub-router for an area. Add flags for ADMIN, IS and WAS states. Add t_stub_router, timer thread to resend router-lsa for an area. * ospf_lsa.c: (ospf_link_cost) new simple function to spit out either the given lnks cost or infinite cost if stub-router is in effect. (lsa_link_{ptop,broadcast,virtuallink,ptomp}_set) use previous function for transit-links. (ospf_stub_router_timer) timer thread for end of startup stub router. Change state as required for the area and setup re-origination of router-lsa. (ospf_stub_router_check) Check/do whether stub-router should be enabled, and whether it requires timer to be setup. (ospf_router_lsa_new) call previous function at top. (ospf_router_lsa_originate) no external callers, made static. * ospf_lsa.h: (ospf_router_lsa_originate) removed. * ospf_main.c: (sigint) make static. remove call to exit, as ospf_terminate now deals with exiting. * ospf_route.c: (ospf_terminate) removed, now in ospfd.c. * ospf_vty.c: (show_ip_ospf_area) print out state of stub-router, if active. (show_ip_ospf) print out configuration of stub-router support, and details of graceful-shutdown if the timer is active. ((no)?ospf_max_metric_router_lsa_{admin,startup,shutdown}) new commands to (de-)?configure stub-router support. (config_write_stub_router) write out config of stub-router. (ospf_config_write) call previous. (ospf_vty_init) install the new stub-router commands. * ospfd.c: various functions made static. (ospf_new) Set defaults for stub-router. Graceful shutdown is made to default on, just to be adventerous. (ospf_graceful_shutdown_finish) new function, final part of shutdown. (ospf_graceful_shutdown_timer) timer thread wrapper for graceful-shutdown. (ospf_graceful_shutdown_check) check whether to setup timer for shutdown or proceed directly to final shutdown. (ospf_terminate) moved here from ospf_route.c, call ospf_finish for each instance. (ospf_finish) renamed to ospf_finish_final and made static. (ospf_finish) new function, exported wrapper around ospf_graceful_shutdown_check. (ospf_finish_final) complete shutdown of an instance. Add missing TIMER_OFF's of two timer threads. (ospf_area_free) opaque self lsa timer should be turned off.
2005-10-232005-10-23 Paul Jakma <paul.jakma@sun.com>paul
* ospf_apiserver.c: (ospf_apiserver_term) This function should not have side-effects (eg segv) if no apiserver instances are active, ie be robust.
2005-10-232005-10-23 Paul Jakma <paul.jakma@sun.com>paul
* ospf_vty.c: (show_ip_ospf) fix display of SPF timer if it has not yet been run.
2005-10-212005-10-21 Paul Jakma <paul.jakma@sun.com>paul
* ospf_dump.c: (ospf_timeval_dump) fix ms adjustment, thanks to Andrew Schorr. * ospf_vty.c: (ospf_config_write) fix write out of spf timers configuration.
2005-10-212005-10-21 Paul Jakma <paul.jakma@sun.com>paul
* (general) SPF millisecond resolution timer with adaptive, linear back-off holdtime. Prettification of ospf_timer_dump. * ospf_dump.c: (ospf_timeval_dump) new function. The guts of ospf_timer_dump, but made to be more dynamic in printing out the relative timeval, sliding the precision printed out according to the value. (ospf_timer_dump) guts moved to ospf_timeval_dump. * ospf_dump.h: export ospf_timeval_dump. * ospf_flood.c: (ospf_flood) remove gettimeofday, use the libzebra exported recent_time instead, as it's not terribly critical to have time exactly right - the dropped LSA will be retransmited to us if we don't ACK it. * ospf_packet.c: (ospf_ls_upd_timer) Ditto, but here we're not transmitting, just putting LSA back on update transmit list. * ospfd.h: delay and holdtimes should be unsigned. Add spf_max_holdtime and spf_hold_multiplier. Update default defines for delay and hold time to be in msec. (struct ospf) change the SPF timestamp to a struct timeval. Remove ospf_timers_spf_(un)?set. * ospfd.c: (ospf_timers_spf_{set,unset}) removed. (ospf_new) initialise spf_max_holdtime and spf_hold_multiplier * ospf_spf.c: (ospf_spf_calculate) SPF timestamp is a timeval now, update with gettimeofday. (ospf_spf_calculate_schedule) Change SPF timers to millisecond resolution. Make the holdtime be adaptive, with a linear increase in holdtime ever consecutive SPF run which occurs within holdtime of previous SPF, bounded by spf_max_holdtime. * ospf_vty.c: Update spf timers commands. (ospf_timers_spf_set) trivial helper. (ospf_timers_throttle_spf_cmd) new command to set SPF delay, initial hold and max hold times with millisecond resolution. (ospf_timers_spf_cmd) Deprecated. Accept the old values, convert to msec, truncate to new limits. (no_ospf_timers_throttle_spf_cmd) set timers to defaults. (no_ospf_timers_spf_cmd) deprecated form, same as previous. (show_ip_ospf_cmd) Display SPF parameters and times. (show_ip_ospf_neighbour_header) Centralise the 'sh ip os ne' header. (show_ip_ospf_neighbor_sub) Fix the field widths. Get rid of the multiple spaces which were making the lines even longer. (show_ip_ospf_neighbor_cmd) Use show_ip_ospf_neighbour_header (show_ip_ospf_neighbor_all_cmd) ditto and fix the field widths for NBMA neighbours. (show_ip_ospf_neighbor_int) Use header function. (show_ip_ospf_nbr_nbma_detail_sub) use sizeof for timebuf, local array - safer. (show_ip_ospf_neighbor_detail_sub) ditto (ospf_vty_init) install the new SPF throttle timer commands.
2005-10-212005-10-21 Paul Jakma <paul.jakma@sun.com>paul
* (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.