ajs [Fri, 28 Jan 2005 20:28:35 +0000 (20:28 +0000)]
2005-01-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* lib/command.h: Document behavior of argv_concat function.
* lib/command.c: (argv_concat) Calculate total string length first so
we can call malloc just once (instead of realloc'ing to add each
string element).
(do_echo,config_logmsg) Allow for possible NULL return value from
argv_concat.
hasso [Sun, 23 Jan 2005 21:42:25 +0000 (21:42 +0000)]
* lib/command.[ch]: Make node_parent() function nonstatic. vtyh.c will
use it as well.
* vtysh/vtysh.c: Implement walkup in node tree for vtysh as it already
works in vty.
ajs [Tue, 18 Jan 2005 22:18:59 +0000 (22:18 +0000)]
2005-01-18 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* log.h: Test for SA_SIGINFO to see whether zlog_signal takes final
two args (siginfo and program_counter).
* log.c: (hex_append) Include this function only if SA_SIGINFO or
HAVE_GLIBC_BACKTRACE is defined.
(zlog_signal) Final two args (siginfo and program_counter) now
depend on whether SA_SIGINFO is defined on this platform.
* sigevent.c: (program_counter) Do not include this function if
SA_SIGINFO is not defined on this platform.
(exit_handler,core_handler) Test for SA_SIGINFO to decide whether
2nd & 3rd arguments are present and to decide how to invoke
zlog_signal.
(trap_default_signals) Test for SA_SIGINFO and invoke sigaction
appropriately.
ajs [Mon, 17 Jan 2005 15:22:28 +0000 (15:22 +0000)]
2005-01-17 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* log.h: Change prototype for zlog_backtrace_sigsafe to take additional
program_counter argument.
* log.c: (zlog_backtrace_sigsafe) Add additional program_counter
argument. If it is non-NULL, use backtrace_symbols_fd to resolve
the address.
(zlog_signal) Call zlog_backtrace_sigsafe with additional
program_counter argument.
hasso [Sun, 16 Jan 2005 23:31:54 +0000 (23:31 +0000)]
* command.[ch], vty.c: cmd_execute_command() function must not attempt
to walk up in the node tree if called from vtysh. Different daemons
might have commands with same syntax in different nodes (for example
"router-id x.x.x.x" commands in zebra/ospfd/ospf6d daemons).
* vtysh.c: Reflect changes in lib. cmd_execute_command() should know
now that it's called from vtysh and must not attempt to walk up in
the node tree.
ajs [Wed, 12 Jan 2005 17:27:27 +0000 (17:27 +0000)]
2005-01-12 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* configure.ac: Test for header file <ucontext.h> (for use in
signal processing).
* sigevent.c: (trap_default_signals) Use the SA_SIGINFO flag to
pass additional siginfo_t and ucontext_t arguments to core_handler
and exit_handler.
(core_handler,exit_handler) Now invoked with 3 arguments (using
SA_SIGINFO). Pass additional info to zlog_signal.
(program_counter) New function to find program counter in ucontext_t,
needs to be enhanced to support more platforms (currently works only
on Linux/x86).
* log.h: Change the zlog_signal prototype to add new arguments
siginfo_t * and program_counter.
* log.c: (zlog_signal) Add new arguments siginfo and program_counter.
Include si_addr and program counter (if non-NULL) in message.
And remove #ifdef HAVE_GLIBC_BACKTRACE around hex_append, since
that is now used to render the si_addr and PC pointers.
ajs [Wed, 12 Jan 2005 16:52:55 +0000 (16:52 +0000)]
2005-01-12 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* configure.ac: If configure is invoked with --enable-snmp, but
the configure script is unable to find SNMP support on the platform,
then configure should give an error message and exit.
ajs [Wed, 12 Jan 2005 16:41:33 +0000 (16:41 +0000)]
2005-01-12 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* redhat/quagga.spec.in: Pass --enable-gcc-rdynamic to configure
to get gcc to link with -rdynamic for better backtraces.
When the rpm is upgraded, the restart logic now works as follows:
1. stop watchquagga; 2. stop all routing daemons; 3. restart zebra
if it was running; 4. start all routing daemons that were running;
and 5. start watchquagga if it was running.
ajs [Wed, 12 Jan 2005 16:24:51 +0000 (16:24 +0000)]
2005-01-12 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* watchquagga.c: (run_job) Fix bug: delay.tv_sec was being used
without having been initialized when the "force" argument was true.
(try_restart) When phased restart is stopping the routing daemons,
it should tell run_job to update the restart interval.
(phase_check) In final step of phased restart when the routing
daemons are being started again, tell run_job not to update
the restart interval (this is now done when the daemons are
stopped).
paul [Mon, 10 Jan 2005 22:31:16 +0000 (22:31 +0000)]
2005-01-10 Paul Jakma <paul@dishone.st>
* texinfo.tex: Updated to a version which understands @{ and @}
* vtysh.texi: Add node name for @section
* quagga.info: updated build of autogenerated file
gdt [Mon, 10 Jan 2005 14:20:43 +0000 (14:20 +0000)]
2005-01-10 Greg Troxel <gdt@fnord.ir.bbn.com>
* ospf_packet.h: Remove commented out definition of
OSPF_MAX_PACKET; neither it or the uncommented one are used any more.
* ospf_packet.c (ospf_make_ls_upd): Leave room for authentication
when deciding if an update will fit.
(ospf_packet_authspace): Factor out calculation of size required
for authentication.
(ospf_make_db_desc): Use ospf_max_packet, not OSPF_MAX_PACKET.
Don't confuse readers that there is a macro.
paul [Wed, 5 Jan 2005 08:30:35 +0000 (08:30 +0000)]
2005-01-05 Paul Jakma <paul@dishone.st>
* zserv.c: (zebra_accept) Comment out setting of socket to NONBLOCK
for now, as we dont actually deal with with resending.... See
bugzilla #122, fix from wawa@yandex-team.ru (Vladimir Ivanov).
* kernel_socket.c: (routing_socket) ditto.
paul [Wed, 5 Jan 2005 08:14:13 +0000 (08:14 +0000)]
2005-01-05 Paul Jakma <paul@dishone.st>
* bgp_packet.c: (bgp_write) set socket to nonblock while writing
this should be generalised. See bugzilla #102. Fix supplied by
wawa@yandex-team.ru (Vladimir Ivanov).
ajs [Tue, 4 Jan 2005 16:24:43 +0000 (16:24 +0000)]
2005-01-04 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* configure.ac: Added test for broken CMSG_FIRSTHDR macro
(relevant for Solaris 8 and unpatched Solaris 9, don't know
whether other platforms are affected).
* zebra.h: Define ZCMSG_FIRSTHDR appropriately based on whether
config.h indicates HAVE_BROKEN_CMSG_FIRSTHDR (as determined
by the configure test program).
* sockopt.c: (getsockopt_cmsg_data) Use ZCMSG_FIRSTHDR instead
of CMSG_FIRSTHDR.
* rtadv.c: (rtadv_recv_packet,rtadv_send_packet) Use ZCMSG_FIRSTHDR
instead of CMSG_FIRSTHDR.
* ripd.c: (rip_recvmsg) Use ZCMSG_FIRSTHDR instead of CMSG_FIRSTHDR.
* ripngd.c: (ripng_recv_packet) Use ZCMSG_FIRSTHDR instead of
CMSG_FIRSTHDR.
ajs [Wed, 29 Dec 2004 20:41:26 +0000 (20:41 +0000)]
2004-12-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospf_packet.c: (ospf_read) Always look up the interface if
ospf_recv_packet returns NULL ifp, since some platforms such
as Solaris 8 appear to support ifindex retrieval but don't.
gdt [Wed, 29 Dec 2004 20:06:23 +0000 (20:06 +0000)]
2004-12-29 Greg Troxel <gdt@poblano.ir.bbn.com>
* sockopt.c (getsockopt_ipv4_ifindex): Document calling
convention. Beef up comments. Handle the case where the cmsghdr
has a zero controllen, or more specifically when the wanted option
is not present. This is needed for Solaris 8, and in general for
any platform for which configure finds a method and it can fail.
Mark some changes with XXX to be cleaned up post 0.98.
ajs [Wed, 22 Dec 2004 17:52:29 +0000 (17:52 +0000)]
2004-12-22 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* redhat/quagga.spec.in: Add watchquagga, and fix some other
logic to make sure that all daemons are restarted on upgrades
and stopped on package removal.
ajs [Wed, 22 Dec 2004 16:17:16 +0000 (16:17 +0000)]
2004-12-22 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* watchquagga.c: Add -b option to circumvent difficulties passing
embedded spaces in command-line arguments. This is an ugly hack,
we should probably use a config file instead.
ajs [Fri, 17 Dec 2004 20:50:00 +0000 (20:50 +0000)]
2004-12-17 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* pid_output.c: (pid_output_lock) Eliminate static function, and just
use the #ifdef to decide which version of the function to include.
This eliminates a compilation problem with gcc4. And fix the
non-fcntl version so that it actually compiles. Exit with
status 1 instead of -1 on error.
ajs [Thu, 16 Dec 2004 16:18:13 +0000 (16:18 +0000)]
2004-12-16 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ripng_nexthop.c: Replace NEXTHOP_OUT macro with NEXTHOP_OUT_PTR,
since it's not really OK to take the address of a ternary expression.
(_ripng_rte_cmp,ripng_rte_send) Use new NEXTHOP_OUT_PTR macro
instead of NEXTHOP_OUT.
ajs [Wed, 15 Dec 2004 15:07:19 +0000 (15:07 +0000)]
2004-12-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospf_interface.h: Declare new function ospf_default_iftype.
* ospf_interface.c: (ospf_default_iftype) New function to centralize
this logic in one place.
* ospf_zebra.c: (ospf_interface_add) Use new function
ospf_default_iftype.
* ospf_vty.c: (no_ip_ospf_network,config_write_interface) Fix logic
by using new function ospf_default_iftype.
ajs [Sat, 11 Dec 2004 18:00:06 +0000 (18:00 +0000)]
2004-12-11 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* 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.
gdt [Thu, 9 Dec 2004 14:51:03 +0000 (14:51 +0000)]
ospf_apiserver_term:
Remove unused variable.
Add comment: this is seriously broken, and needs fixing. It appears
likely to segfault if ever called. Comments please - should I make
the fix I suggest in the comment? -gdt
gdt [Thu, 9 Dec 2004 14:46:46 +0000 (14:46 +0000)]
Add comments with warnings obtained on NetBSD/i386. Both are due to
size_t being used for streams. Perhaps cast to unsigned long before
printf? Surely that's big enough even if size_t could be larger in
theory.