Age | Commit message (Collapse) | Author |
|
2006-08-03 Paul Jakma <paul.jakma@sun.com>
* ospf_packet.c: (ospf_make_db_desc) Unset the DD More bit
after constructing the packet, if appropriate.
(ospf_db_desc_proc) Speed up Exchange, slave should raise
ExchangeDone earlier, as RFC mandates, by forming its reply
before deciding whether both sides are done, avoids a
needless round of empty DD packet exchanges at the end of
Exchange, hence speeding up ExchangeDone.
(ospf_db_desc) use UNSET_FLAG macro.
|
|
2006-08-04 Paul Jakma <paul.jakma@sun.com>
* ospf_lsdb.c: (ospf_lsdb_delete_entry) new function, consolidate
exact same functionality replicated in other functions.
(ospf_lsdb_add) Strip out code by using ospf_lsdb_delete_entry.
(ospf_lsdb_delete) ditto.
(ospf_lsdb_delete_all) ditto.
|
|
2006-07-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospfd.c: (ospf_router_id_update) Fix and document the algorithm for
selecting the router ID: if there is not a statically configured ID,
then stick to the most recent value to avoid disruptive changes.
This should fix bug #288.
|
|
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.
|
|
2006-07-25 Paul Jakma <paul.jakma@sun.com>
* ospf_neigbor.h: (struct ospf_neighbor) Add some additional
neighbour state statistics fields, timestamps for progressive
and regressive state changes, and pointer to event string
for the latter state change.
* ospf_nsm.c: (nsm_notice_state_change) Update new state changs
history as required.
* ospf_vty.c: (show_ip_ospf_neighbor_detail_sub) Print out above
new per-neighbour state change stats.
|
|
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-10 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospf_packet.c: (ospf_hello) Improve NetworkMask mismatch warning
message to include interface name and conflicting prefix lengths.
|
|
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_lsa.c: (ospf_translated_nssa_refresh) CID #13.
|
|
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-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospf_vty.c: (show_ip_ospf_neighbor_id) Should show all instances
of that neighbor (since it may appear on multiple interfaces)
instead of bailing out after showing the first match.
|
|
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-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 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 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 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-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 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-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-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-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 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 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 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 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 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 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-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-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-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 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 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-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 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-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-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-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 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 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 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-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 Juris Kalnins <juris@mt.lv>
* ospf_packet.c: (ospf_make_md5_digest) fix odd, if not
undefined effect, assignment of an increment expression.
|