Age | Commit message (Collapse) | Author |
|
* ospf_interface.c: (ospf_if_table_lookup) Fix a serious bug
a less serious one.
1: this function is supposed to lookup
entries in the oifs ospf_interface route_table and return either
an existing oi or NULL to indicate not found, its caller depends
on this, yet this function uses route_node_get which /always/
returns a route_node - one is created if none exists. Use
route_node_lookup instead. This should fix root cause of the
reports of the (ospf_add_to_if) assert being hit.
2: oi's are inserted into this table with prefixlength set to
/32 (indeed, it should be a hash table, not a route_table),
however prefixlength to lookup was not changed, if no valid entry
can be inserted other than /32, then nothng but /32 should be
looked up. This possibly only worked by fluke..
Fix confirmed by 2 reporters (one list, one IRC), definitely a
backport candidate once it has been incubated in HEAD for a while.
Thanks to Patrick Friedel and Ivan Warren for testing.
|
|
* getopt.h: It's not just __GNU_LIBRARY__ which defines
getopt, eg __EXTENSIONS__ does too on SunOS. It still seems
awfully fragile though.
* getopt.c: include zebra.h after config.h, before including
getopt.h so that things at least are consistent..
* getopt1.c: ditto
|
|
defines.texi is autogenerated every configure time so it will always
be newer than quagga.info, and hence require quagga.info to be built. drat.
|
|
* prototype.daemons.in: Move the Solaris 10 SMF specific stuff to
a seperate package.
* depend.smf: dependencies for smf package
* pkginfo.smf.tmpl.in: pkginfo for smf
* prototype.smf.in: prototype for smf
* Makefile.am: Add smf to pkg_names
|
|
|
|
* quagga.xml.in: Sigh, XML child elements are order-sensitive.
* prototype.doc.in: info/dir doesnt get created always.. comment
out for now, likely needs to be done with an install method.
|
|
* configure.ac: Comment out the touch doc/quagga.info hack. I'm
hoping it's not needed anymore, cause it breaks out of tree builds
which i've become fond of.. Plus I think we sorted out most of
the original problems (updated texinfo.tex, moved the version
info to an autogenerated by automake version.texi). Dist users
most definitely wont be affected.
|
|
* (general) Fix memory leaks in opaque AS-scope LSAs, reported and
with much debugging done by by scott collins <scollins@agile.tv>.
(possible backport candidate?)
* ospf_lsa.c: (ospf_discard_from_db) dont call
ospf_ase_unregister_external_lsa for opaque-lsa's, opaques are
never registered with ase in the first place.
* ospf_packet.c: (general) Disabuse opaque related code of its
tendency to try gather up things into temporary lists.
(ospf_ls_upd) remove the temporary lists opaque uses, call
opaque functions inline, just like all other types.
(ospf_ls_ack) ditto.
(ospf_recv_packet) fixup sign warning.
* ospf_opaque.c: (general) fix the unneeded use of lists, and
untwist some of the logic.
(ospf_opaque_self_originated_lsa_received) take a single LSA
as argument, not a list of them. Remove the list loop. Logic
otherwise unchanged.
(ospf_opaque_ls_ack_received) Mostly ditto. But untwist the logic,
move the actions up into the switch block, remove the goto's and
sanitise the logic near the end a bit.
* ospf_opaque.h: Adjust definitions of aforementioned functions
in ospf_opaque.c to match.
|
|
* rip_interface.c (rip_interface_add): Need to call
rip_passive_interface_apply (was already calling it in
rip_interface_up).
[backport candidate]
|
|
* configure.ac: Check for OSes which support passing ifindex in
struct ip_mreq.
* lib/sockopt.c: Add support for BSD style ifindex in ip_mreq.
* ospfd/ospf_network.c: Log ifindex on multicast membership leave/join
events.
|
|
* (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.
|
|
* zserv.h: Remove ZEBRA_PORT definition, its in lib/zebra.h now
|
|
* (general) extern and static'ification of functions in code and
header.
Cleanup any definitions with unspecified arguments.
Add casts for callback assignments where the callback is defined,
typically, as passing void *, but the function being assigned has
some other pointer type defined as its argument, as gcc complains
about casts from void * to X* via function arguments.
Fix some old K&R style function argument definitions.
Add noreturn gcc attribute to some functions, as appropriate.
Add unused gcc attribute to some functions (eg ones meant to help
while debugging)
Add guard defines to headers which were missing them.
* command.c: (install_node) add const qualifier, still doesnt shut
up the warning though, because of the double pointer.
(cmp_node) ditto
* keychain.c: (key_str2time) Add GET_LONG_RANGE() macro, derived
fromn vty.h ones to fix some of the (long) < 0 warnings.
* thread.c: (various) use thread_empty
(cpu_record_hash_key) should cast to uintptr_t, a stdint.h type
* vty.h: Add VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX so they
removed from ospfd/ospf_vty.h
* zebra.h: Move definition of ZEBRA_PORT to here, to remove
dependence of lib on zebra/zserv.h
|
|
|
|
* (general) More cleaning up of stream abuse, isisd should be
back to previous functionality. Replace various XMALLOC+memset's
with XCALLOC
* isis_tlv.c: (tlv_add_padding) use stream_put to clear the stream
rather than forward endp, as isisd reuses streams.
* isis_pdu.c: (process_lsp) cleanup direct reference to stream endp
(send_lsp) manual copy of a stream cleaned up to use stream_copy.
* isis_network.c: (isis_recv_pdu_bcast) replace direct memcpy with
stream_write
(isis_recv_pdu_p2p) replace recvfrom directly into stream with
stream_recvfrom. Remove dangerous and now unneeded manual update
of endp.
(isis_recv_pdu_bcast / non-GNU_LINUX) Replace direct memcpy with
stream_write.
(isis_recv_pdu_p2p) replace read direct into stream with
stream_read_try, and hence remove the manual update of endp.
* isis_lsp.c: (lsp_update_data) manual stream dup replaced with
stream_dup.
(lsppdu_realloc) mempcy into stream data replaced with stream_put.
(lsp_build_nonpseudo) remove mysterious stream_forward_endp's -
which were originally stream_set_putp - shouldn't be needed
now that all the manual fiddling of private stream data has been
corrected.
(build_topology_lsp_data) remove unneeded twiddling of endp,
appears to be due to lsppdu_realloc(), but it appears to sort of
do the right thing wrt streams.
|
|
* stream.h: Add comment about the special zero-ing ability of
stream_put.
(stream_recvmsg, stream_write) should return ssize_t and size_t
respectively. Should both be extern linkage.
(stream_recvfrom) Stream aware wrapper around recvfrom, in style
of stream_read_try.
* stream.c: (stream_recvfrom) new function, wrapper around recvfrom.
(stream_recvmsg, stream_write) ssize_t and size_t return values
|
|
* NEWS: Added some more 0.99 news.
* configure.ac: bump to 0.99.1 (0.99.0 was never released except
via CVS snapshots)
|
|
* defines.texi.in: Add PACKAGE_NAME, PACKAGE_STRING.
* quagga.texi: Use PACKAGE_NAME, this is more to give me an excuse
to update quagga.texi so that the 'UPDATED' in version.texi will
be more recent, the Makefile seems to be dumb and not examine
the texi files from which quagga.texi is generated.
* quagga.info: Fresh copy to match updates.
|
|
* quagga.info: updated
* Makefile.am: automake seems to depend doc built stuff on srcdir
for some reason, or maybe its cause we have quagga.info,
quagga.texi in CVS - not sure. Anyway, the static rule for
quagga.pdf should depend on the srcdir quagga.texi in that case.
|
|
* NEWS: Added some 0.99 news
|
|
* quagga.info: updated
|
|
* rib.h: (struct rib) Add lock field for refcounting.
* zserv.h: (struct zebra_t) Add a ribq workqueue to the zebra
'master' struct.
* zserv.c: (zread_ipv4_add) XMALLOC then memset should be XCALLOC.
* zebra_rib.c: Clean up refcounting of route_node, make struct rib
refcounted and convert rib_process to work-queue. In general,
rib's should be rib_addnode'd and delnode'd to route_nodes, and
these symmetrical functions will manage the locking of referenced
route_node and freeing of struct rib - rather than having users
manage each seperately - with much scope for bugs..
(newrib_free) removed and replaced with rib_lock
(rib_lock) new function, check state of lock and increment.
(rib_unlock) new function, check lock state and decrement. Free
struct rib if refcount hits 0, freeing struct nexthop's, as
newrib_free did.
(rib_addnode) Add RIB to route_node, locking both.
(rib_delnode) Delete RIB from route_node, unlocking each.
(rib_process) Converted to a work-queue work function.
Functional changes are minimal, just arguments, comments and
whitespace.
(rib_queue_add_qnode) Helper function to setup a ribq item.
(rib_queue_add) Helper function, same arguments as old
rib_process, to replace in callers of rib_process.
(rib_queue_qnode_del) ribq deconstructor.
(rib_queue_init) Create the ribq.
(rib_init) call rib_queue_init.
(remainder) Sanitise refcounting of route_node's. Convert to
rib_queue_add, rib_addnode and rib_delnode. Change XMALLOC/memset
to XCALLOC. Remove calls to nexthop_delete and nexthop_free.
|
|
Add wall-clock timing statistics to 'show thread cpu' output.
* thread.h: Define struct rusage_t to contain wall-clock time
and cpu time. Change GETRUSAGE macro to collect both pieces
of data. Make appropriate changes to struct cpu_thread_history
to track CPU time and real time. Change proto for
thread_consumed_time to return real and cpu time elapsed.
And declare a new global variable 'struct timeval recent_time'.
* thread.c (struct timeval recent_time): New global timestamp variable.
(timeval_adjust): If timeout is negative, set to 0 (not 10
microseconds). And remove upper bound of 1,000,000 seconds, since
this does not seem to make any sense (and it breaks
funcname_thread_add_timer_timeval).
(timeval_cmp): Should return long, not int.
(vty_out_cpu_thread_history): Show CPU time and real time.
(cpu_record_hash_print): Calculate totals for CPU and real time.
(cpu_record_print): Change 'show thread cpu' title to show CPU and
real time.
(thread_timer_remain_second): Put current time in global recent_time.
(funcname_thread_add_timer_timeval): Fix assert. Replace 2-case
switch assignment with a ternary expression. Use global recent_time
variable. Fix use of timeval_adjust (previously, the value was not
actually being adjusted).
(thread_cancel): Add missing "break" statement in case
THREAD_BACKGROUND.
(thread_timer_wait): Use global recent_time value instead of calling
gettimeofday. And there's no need to check for negative timeouts,
since timeval_subtract already sets these to zero.
(thread_timer_process): Timers are sorted, so bail out once we
encounter a timer that has not yet popped. And remove some
extraneous asserts.
(thread_fetch): Do not process foreground timers before calling
select. Instead, add them to the ready list just after the select.
Also, no need to maintain a count of the number of ready threads,
since we don't care how many there are, just whether there's
one at the head of the ready list (which is easily checked).
Stick current time in global variable recent_time to reduce
the number of calls to gettimeofday. Tighten logic for
calculating the select timeout.
(thread_consumed_time): Now returns real time and puts the elapsed
cpu time in an additional argument.
(thread_should_yield): Use real (wall-clock) time to decide whether
to yield.
(thread_call): Maintain CPU and real time statistics.
* vty.c (vty_command): For slow commands, show real and cpu time.
|
|
* workqueue.c (show_work_queues): Remove unused gettimeofday call.
|
|
* memory.h: memtypes is built source, default includes points to
top_builddir, so we should refer to lib/memtypes.h
|
|
* workqueue.h: (struct work_queue_item) change retry_count to ran,
its a count of number item has been run.
* workqueue.c: (show_work_queues) Fix formating of slightly
bugfix: fix SIGFPE if wq->runs is 0.
(work_queue_run) retry logic was slightly wrong.
cycles.best is 0 initialy, granularity is 1, so update best
if cycles >= granularity, not just >.
|
|
* buffer.c (buffer_write): Comment out call to buffer_flush_available.
This should speed up buffering at the expense of a possible increase
in latency in flushing the data if inside a long-running thread.
|
|
* quagga.xml.in: New, better, single integrated manifest for all
the services, courtesy of alan.maguire@sun.com.
* {{ospf,ospf6,rip,ripng,bgp}d,zebra}.xml.in: removed due to
previous
* quagga.init.in: Use the package tarname for properties, use
the correct daemon name variable.
* Makefile.am: Updated to match single manifest
* prototype.daemons.in: ditto
|
|
|
|
* main.c: new file, common 'main' portion which then calls
test_init.
* heavy.c: remove common portions now in 'main.
* heavy-wq.c: ditto
* heavy-thread.c: ditto
* heavy*.c: Set the slow_function iteration number lower, to 300, it
was several orders of magnitude too 'slow' to be useful. :)
* Makefile.am: main is a source of the tests. heavy should link
to the math library.
|
|
|
|
* workqueue.{c,h}: Helper API for setting up and running queues via
background threads.
* command.c: install the 'show workqueues' command
* memtypes.c: Add work queue mtypes, and a rib-queue type for
a zebra rib work queue.
* memtypes.h: Updated to match memtypes.c
* Makefile.am: Add new workqueue files to build.
|
|
the rpmbuild commandline, eg rpmbuild --define 'keep_build 1'
|
|
* thread.c: Kill unused TIMER_NO_SORT bits
|
|
to HACKING (which I added..)
|
|
* memory.c: Make the string field much wider
* memtypes.c: Correct the prefix list str/entry strings
|
|
* Makefile.am: Refer to source files via srcdir variable, fix
out-of-tree build breakage.
|
|
* HACKING: Add some notes about build system changes, to
document common oversights (common for me anyway).
Seperate sections with two newlines, easier to read.
|
|
* thread.h: Fix type for struct thread_master add_type: should be
unsigned char. Also, add some documentation of thread_add_background
args. And remove extraneous declaration of
show_thread_work_queues_cmd.
|
|
* memory.h: Move include of memtypes.h to after the definition of
struct memory_list, gcc 4.0 doesn't like arrays of incomplete
types.
|
|
* bgpd.8,isisd.8,ospf6d.8,ospfd.8,ripd.8,ripngd.8,zebra.8: Fix
spelling mistake: idenifier -> identifier.
|
|
* bgpd.8,isisd.8,ospf6d.8,ospfd.8,ripd.8,ripngd.8,zebra.8: Fix
spelling mistake: intrefaces -> interfaces.
|
|
|
|
* Makefile.am: Build heavythread
|
|
* heavy-thread.c: Andrew Schorr's adaptation of heavy.c to use a
background thread to avoid responsivity problems.
|
|
* thread.h: Add background thread type and thread_add_background
macro and accompanying funcname_... function.
export thread_should_yield, background threads can use it.
Lower thread yield time to 10ms, 100ms is noticeable lag and
a thread would only be /starting/ to finish sometime afterward.
* thread.c: (general) Add background thread type and schedule
nearly all thread types through the ready list for fairness.
(timeval_adjust) static qualifier missing
(vty_out_cpu_thread_history) add support for printout of
background threads
(show_thread_cpu) ditto.
(thread_master_debug) add debug of background list
(thread_master_create) fixup long line
(thread_add_unuse) add asserts for required state.
(thread_master_free) free background thread list
(funcname_thread_add_timer_timeval) make generic, able to
support arbitrary timer-like thread types.
(funcname_thread_add_timer) pass thread type to .._add_timer_timeval
(funcname_thread_add_timer_msec) ditto
(funcname_thread_add_background) Add a background thread, with an
optional millisecond delay factor, using .._add_timer_timeval.
(thread_cancel) Add background thread type.
Move the thread_list_delete common to all cases to bottom of
function, after the switch statement..
(thread_cancel_event) indent
(thread_timer_wait) Static qualifier, and make it able to cope
with arbitrary timer-like thread lists, so its of use to
background threads too.
(thread_process_fd) static qualifier. Again, make it take a list
reference rather than thread_master. Fix indentation.
(thread_timer_process) Check for ready timer-like threads in the
given list and move them on to the ready list - code originally
embedded in thread_fetch.
(thread_fetch) Schedule all threads, other than events, through
the ready list, to ensure fairness. Timer readying code moved to
thread_timer_process so it can be reused for background threads.
Remove the unneeded quagga_sigevent_process, as pointed out by
John Lin <john.ch.lin@gmail.com>.
(thread_should_yield) make this available.
|
|
|
|
* heavy.c: Add a timer thread to demonstrate thread interactivity,
Add a daemon_exit command to assist with debugging (eg for memory
tracers, etc..)
|
|
* Makefile.am: pkginfo.%.tmpl is a generated file, srcdir prefix
is not appropriate.
|
|
version of RIPng is v1).
|