Age | Commit message (Collapse) | Author |
|
2006-09-14 Paul Jakma <paul.jakma@sun.com>
* bgp_route.c: (bgp_process_queue_init) process queue hold time
too high, adds extra memory load. Change to be much lower,
until such time as it's made configurable.
|
|
2006-09-14 Paul Jakma <paul.jakma@sun.com>
* bgp_route.c: (bgp_table_stats_walker) Address space announced
should only count top-level unaggregateable prefixes, to
avoid falling afoul of anti-dodgy-accounting regulations
in various jurisdictions.. ;)
|
|
2006-09-14 Paul Jakma <paul.jakma@sun.com>
* (general) fix the peer refcount issue exposed by previous, by
just removing refcounting of peer threads, which is mostly
senseless as they're references leading from struct peer,
which peer_free cancels anyway. No need to muck around..
* bgp_fsm.h: Just remove the refcounting from the various
TIMER/READ/WRITE/EVENT ON/OFF/ADD macros.
* bgp_fsm.c: (bgp_stop) use BGP_EVENT_FLUSH, no refcounts attached
to events anymore.
(bgp_event) remove peer_unlock, events not refcounted.
* bgpd.c: (peer_free) flush events before free.
|
|
2006-09-14 Paul Jakma <paul.jakma@sun.com>
* (general) Fix some niggly issues around 'shutdown' and clearing
by adding a Clearing FSM wait-state and a hidden 'Deleted'
FSM state, to allow deleted peers to 'cool off' and hit 0
references. This introduces a slow memory leak of struct peer,
however that's more a testament to the fragility of the
reference counting than a bug in this patch, cleanup of
reference counting to fix this is to follow.
* bgpd.h: Add Clearing, Deleted states and Clearing_Completed
and event.
* bgp_debug.c: (bgp_status_msg[]) Add strings for Clearing and
Deleted.
* bgp_fsm.h: Don't allow timer/event threads to set anything
for Deleted peers.
* bgp_fsm.c: (bgp_timer_set) Add Clearing and Deleted. Deleted
needs to stop everything.
(bgp_stop) Remove explicit fsm_change_status call, the
general framework handles the transition.
(bgp_start) Log a warning if a start is attempted on a peer
that should stay down, trying to start a peer.
(struct .. FSM) Add Clearing_Completed
events, has little influence except when in state
Clearing to signal wait-state can end.
Add Clearing and Deleted states, former is a wait-state,
latter is a placeholder state to allow peers to disappear
quietly once refcounts settle.
(bgp_event) Try reduce verbosity of FSM state-change debug,
changes to same state are not interesting (Established->Established)
Allow NULL action functions in FSM.
* bgp_packet.c: (bgp_write) Use FSM events, rather than trying
to twiddle directly with FSM state behind the back of FSM.
(bgp_write_notify) ditto.
(bgp_read) Remove the vague ACCEPT_PEER peer_unlock, or else
this patch crashes, now it leaks instead.
* bgp_route.c: (bgp_clear_node_complete) Clearing_Completed
event, to end clearing.
(bgp_clear_route) See extensive comments.
* bgpd.c: (peer_free) should only be called while in Deleted,
peer refcounting controls when peer_free is called.
bgp_sync_delete should be here, not in peer_delete.
(peer_delete) Initiate delete.
Transition to Deleted state manually.
When removing peer from indices that provide visibility of it,
take great care to be idempotent wrt the reference counting
of struct peer through those indices.
Use bgp_timer_set, rather than replicating.
Call to bgp_sync_delete isn't appropriate here, sync can be
referenced while shutting down and finishing deletion.
(peer_group_bind) Take care to be idempotent wrt list references
indexing peers.
|
|
2006-09-13 Paul Jakma <paul.jakma@sun.com>
* bgp_aspath.c: (aspath_highest) new, return highest ASN in an
aspath.
* bgp_route.c: (bgp_peer_count_walker) new, do the walk done
in bgp_peer_counts as a thread.
(bgp_peer_counts) move walk to previous and call it via
thread_execute so this RIB walk shows up in thread stats.
(bgp_table_stats) New, gather some statistics for a given
RIB.
(bgp_table_stats_walker) New, RIB walker thread for former.
(bgp_table_stats_vty) Parsing front-end for 'show bgp ...',
useful model for future rationalisation of 'show ... bgp'.
(bgp_route_init) Add new RIB stats commands.
|
|
* kernel_socket.c (rtm_type_str): ifdef RTM_OLD{ADD,DEL} to
compile on systems that no longer define them.
|
|
2006-09-11 Paul Jakma <paul.jakma@sun.com>
* rip_routemap.c: (route_set_metric) underflow check needs to
use signed, problem identified and diagnosed by Pavel
Nikiforov in bug #293.
|
|
2006-09-11 Paul Jakma <paul.jakma@sun.com>
* ripd.c: (rip_read) remove gratuitous use of mid-function
declaration of vrecv, bug #278.
|
|
2006-09-06 Paul Jakma <paul.jakma@sun.com>
* (general) Squash any and all prefix-count issues by
abstracting route flag changes, and maintaining count as and
when flags are modified (rather than relying on explicit
modifications of count being sprinkled in just the right
places throughout the code).
* bgp_route.c: (bgp_pcount_{dec,inc}rement) removed.
(bgp_pcount_adjust) new, update prefix count as
needed for a given route.
(bgp_info_{uns,s}et_flag) set/unset a BGP_INFO route status
flag, calling previous function when appropriate.
(general) Update all set/unsets of flags to use previous.
Remove pcount_{dec,inc}rement calls.
No need to unset BGP_INFO_VALID in places where
bgp_info_delete is called, it does that anyway.
* bgp_{damp,nexthop}.c: Update to use bgp_info_{un,}set_flag.
* bgp_route.h: Export bgp_info_{un,}set_flag.
Add a 'meta' BGP_INFO flag, BGP_INFO_UNUSEABLE.
Move BGP_INFO_HOLDDOWN macro to here from bgpd.h
|
|
2006-09-03 Paul Jakma <paul.jakma@sun.com>
* bgp_route.c: Add 'show ... bgp ... <neighbour> prefix-count'
commands, to provide detailed counts of prefixes for a peer.
Informative, and should help pin down to pfxcnt drift
problems.
|
|
2006-08-28 Andy Gay <andy@andynet.net>
* ospf_packet.c: (ospf_make_db_desc) Assert added with More-bit
fixes does not hold up with addition of Ogier DB-Exchange
optimisation, which can empty the db-summary list in between
sent DD packets. Remove assert, update More-bit always when
in Exchange.
|
|
2006-08-27 Paul Jakma <paul.jakma@sun.com>
* configure.ac: Bump to 0.99.5
|
|
2006-08-27 J.J. Krabbendam <jkrabbendam@aimsys.nl>
* ospfd.c: (ospf_finish_final) default redistribute should be
unset too, fixes bug where reconfiguring ospfd completely
can no longer enable default redistribution.
|
|
2006-08-27 Paul Jakma <paul.jakma@sun.com>
* bgp_advertise.c: (bgp_sync_delete) fix mtype in XFREE.
NULL out peer->hash after free, to be sure.
|
|
2006-08-26 Paul Jakma <paul.jakma@sun.com>
* heavy-wq.c: (slow_func_del,slow_func) update to match workqueue
changes
|
|
2006-08-25 Paul Jakma <paul.jakma@sun.com>
* (general) Bug #134. Be more robust to backward time changes,
use the newly added libzebra time functions.
In most cases: recent_time -> recent_relative_time()
gettimeofday -> quagga_gettime (QUAGGA_CLK_MONOTONIC, ..)
time -> quagga_time.
(ospf_make_md5_digest) time() call deliberately not changed.
(ospf_external_lsa_refresh) remove useless gettimeofday, LSA
tv_orig time was already set in ospf_lsa_new, called via
ospf_external_lsa_new.
|
|
2006-08-25 Paul Jakma <paul.jakma@sun.com>
* thread.c: (general) Add support for monotonic clock, it may still
jump forward by huge amounts, but should be immune to going
backwards. Fixes bug #134.
(quagga_gettimeofday_relative_adjust) helper, does what name
says - adjusts gettimeofday based relative timer.
(quagga_gettimeofday) helper to keep recent_time up to date.
(quagga_get_relative) helper, update and getch the relative
timer using gettimeofday(). POSIX CLOCK_MONOTONIC is also
supported, but the code is not enabled yet nor tested.
(quagga_real_stabilised) helper, retrieve absolute time but
stabilised so as to never decrease.
(quagga_gettime) Exported interface, analogous to POSIX
clock_gettime() in interface, supporting several clocks.
(quagga_time) Exported interface, analogous to traditional
time(), will never decrease.
(recent_relative_time) Convenience function to retrieve
relative_time timeval, similar to existing recent_time absolute
timeval, for when an approximately recent value will do.
(remainder) Update to use above helpers.
(thread_getrusage) Previously was a macro, but needs to be
a function to twiddle with thread.c private stuff.
* thread.c: Point the GETRUSAGE macro at previous function.
Export quagga_gettime, quagga_time and recent_relative_time for
general use.
|
|
2006-08-03 Paul Jakma <paul.jakma@sun.com>
* ospf_packet.c: (ospf_make_db_desc) Implement
draft-ogier-ospf-dbex-opt DB-exchange optimisation.
|
|
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-08-06 Paul Jakma <paul.jakma@sun.com>
* rtadv.h: depends on interface.h, so should include it.
|
|
2006-08-06 Paul Jakma <paul.jakma@sun.com>
* interface.h: (ifstat_update_proc) declaration should match
ifstat_update_sysctl really, which is to not return status, as
such status is not used anywhere.
* if_{proc,sysctl}.c: Make ifstat_update_* definitions and return values
consistent with each other and their declarations, ie:
(void) (*) (void).
|
|
2006-08-06 Paul Jakma <paul.jakma@sun.com>
* bgp_aspath.c: (aspath_loop_check) Fix the typo-bug which
essentially had disabled this check. Problem reported by
Bartek Kania <mrbk@gnarf.org> in [quagga-users 7388].
* aspath_test.c: (validate) Fix the sense of the aspath_loop_check,
which was the wrong way around and had actually been testing for
aspath_loop_check to be buggy.
|
|
2006-08-01 Paul Jakma <paul.jakma@sun.com>
* irdp_main.c: (irdp_advertisement) free the stream here, when done,
right under where it was allocated so it's blindingly obvious
it's correct. This possibly fixes a very slow leak of streams in
zebra.
* irdp_packet.c: (send_packet) don't free the stream here as
it's hard to tell if right, plus an error case seemed to
returning before free anyway.
|
|
2006-08-04 Paul Jakma <paul.jakma@sun.com>
* misc_null.c: Add ifstat_update_sysctl, add another required
header.
|
|
2006-08-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* misc_null.c: Must include header files to get older versions of gcc
to process the #pragma statements properly.
|
|
2006-07-28 Paul Jakma <paul.jakma@sun.com>
* main.texi: link-detect works on Solaris too.
* ospfd.texi: Twiddle around with anchors a bit more.
Clarify how setting MD5 auth by area and by interface interact,
and add cross-references, as well as to the required
command for setting key material.
|
|
2006-07-27 Paul Jakma <paul.jakma@sun.com>
* quagga.texi: Remove unused index definitions
Add an Index node - for the concept index.
* routeserver.texi: Set exampleindex to 0, so the example configs
with long IPv6 addresses stand better chance of fitting.
* overview.texi: 'Supported RFC' -> 'Supported RFCs'
Remove paragraph indentation - texinfo does that.
Revise the supported OS list slightly.
Remove the IPv6 stack list, seems very dated and irrelevant.
Revise the 'How to get Quagga' section.
* ospfd.texi: minor tweaks: add some anchors, fix some minor
format issues.
Revise the help for 'abr-type'.
Note that text authentication is unwise, recc'd MD5.
Add some extra text for redistribute and passive-interface,
about how latter can substitute for redist connected.
|
|
|
|
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-27 Paul Jakma <paul.jakma@sun.com>
* rib.h: (struct rib) Add a route_node rn_status flag field,
this has to be copied every time head RIB of a route_node
changes.
Remove the rib lock field, not needed - see below.
Add a status field for RIB-private flags.
* zebra_rib.c: Add a global for the workqueue hold time, useful
for testing.
(general) Fix for bug #268. Problem originally
detailed by Simon Bryden in [quagga-dev 4001].
Essentially, add/delete of a RIB must happen /before/ the
queue. Best-path selection (ie rib_process) and reaping of
freed RIBs can then be done after queueing. Only the route_node
is queued - no important RIB state (i.e. whether a RIB is to be
deleted) is queued.
(struct zebra_queue_node_t) Disappears, no longer need to
track multiple things on the queue, only the route_node.
(rib_{lock,unlock}) removed, RIBs no longer need to be
refcounted, no longer queued.
(rib_queue_qnode_del) Removed, deleted RIBs no longer deleted
via the queue.
(rib_queue_add_qnode) deleted
(rib_queue_add) Only the route_node is queued for best-path
selection, we can check whether it is already queued or
not and avoid queueing same node twice - struct rib * argument
is not needed.
(rib_link/unlink) (un)link RIB from route_node.
(rib_{add,del}node) Front-end to updates of a RIB.
(rib_process) Reap any deleted RIBs via rib_unlink.
Unset the route_node 'QUEUED' flag.
(General) Remove calls to rib_queue_add where add/del node was
called - not needed, update calls where not.
Ignore RIB_ENTRY_REMOVEd ribs in loops through route_nodes
|
|
2006-07-27 Paul Jakma <paul.jakma@sun.com>
* debug.{c,h}: Add 'debug zebra rib' and 'debug zebra rib queue'.
|
|
2006-07-27 Paul Jakma <paul.jakma@sun.com>
* {ioctl,kernel}_null.c: Dummy/Null kernel method implementations,
useful for testing zebra code that calls such methods.
* {redistribute,misc}_null.c: Dummy/Null methods, as above. But
for zclient, and for various misc functions.
* test_main.c: Test harness for zebra, currently just to test the
RIB.
* Makefile.am: Build testzebra using above.
* zebra_rib.c: Add a global for the workqueue hold time, useful
for testing.
|
|
2006-07-27 Paul Jakma <paul.jakma@sun.com>
* bgpd.c: (peer_delete) Ensure freed buffers can not be
accidently reused. A potential fix for bug #287.
|
|
2006-07-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* vtysh.1: Document new options -d and -E, and note that now multiple
-c options may be supplied, with embedded linefeed now supported.
In BUGS section, remove warning about vtysh causing a daemon
to freeze, since this has been fixed.
* vtysh_main.c: (usage) Add new -d and -E options. And note that
-c can be used multiple times, possibly with embedded linefeeds.
(longopts) Add new -d and -E options.
(main) Add new -d and -E options, and create a linked list to
support multiple -c options. Do not call vtysh_connect_all until
after vtysh_read_config(config_default) and vtysh_auth have
succeeded. This prevents the vtysh.conf file from configuring
any daemons, and it ensures that authentication has been passed
before we send any commands to any daemons. Call vtysh_connect_all
with any daemon name supplied with -d. If it is unable to connect
to any daemons, issue an error message and exit immediately.
When used in -c mode, call vtysh_execute("enable") before
executing the commands in order to match interactive behavior.
And detect embedded linefeed chars in -c commands and break them up
appropriately.
* vtysh.h: (vtysh_connect_all) Fix proto to reflect new
daemon_name argument, and that it now returns an integer -- the
number of daemons to which we were able to connect.
* vtysh.c: (vtysh_connect_all) Add a new daemon_name argument.
If supplied, connect only to that daemon. And return
the number of daemons to which we were able to connect.
(vtysh_prompt): Performance enhancement -- make struct utsname
static so we call uname to get the hostname only once.
|
|
2006-07-27 Rumen Svobodnikov <rumen@telecoms.bg>
* connected.c: (connected_up_ipv4) interface connected routes always
go to table main (or otherwise they cannot be used by linux as
nexthops)
* zserv.c: (zread_ipv4_add) send route to the correct routing table
* zebra_rib.c (static_install_ipv4) set routing table
|
|
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-25 Paul Jakma <paul.jakma@sun.com>
* thread.h: (struct thread) Add a cache pointer to the struct
cpu_thread_history, if it is known - saving hash lookup on
each thread_call.
* thread.c: (thread_call) Cache the pointer to the
cpu_thread_history, so that future thread_calls of same
thread can avoid the hash_lookup.
|
|
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-10 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* vty.c: (vty_log_out) Do not call vty_close, because this could
result in a parent function's accessing the freed memory.
Instead, set status VTY_CLOSE and call shutdown(vty->fd, SHUT_RDWR).
And add a comment on vty_close.
|
|
2006-07-10 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* vty.c: (vty_log_out, vty_read, vty_flush, vtysh_flush, vtysh_read)
After an I/O error, must set vty->monitor to 0 before calling
zlog_warn, otherwise an infinite recursion could occur
(since zlog_warn triggers a message to be written to the vty,
and that in turn triggers another error message when it fails, etc.).
|
|
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>
* quagga.info: remove auto-generated file. It will still be
present in dist tarballs, so shouldn't affect anyone but
direct users of CVS. Required texinfo version should be
widely available.
* .cvsignore: ignore quagga.info
|
|
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.
|