Age | Commit message (Collapse) | Author |
|
* command.c (print_version): Do not bother even to examine host.name,
since it is always NULL when this function is called from main.
|
|
* command.c (print_version): Don't print host.name if it is NULL.
Fixes segfault on Solaris reported by Goetz von Escher <goetz@open.ch>
(pullup candidate)
|
|
* 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.
|
|
* zebra.h: If not C99 and no va_copy macro available, fall back to
memcpy (solves a build problem on FreeBSD 4.x).
|
|
* 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.
|
|
described in [quagga-dev 2292].
|
|
|
|
* 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.
|
|
* sockopt.c (getsockopt_ipv4_ifindex): Return 0 when passed a NULL
cmsghdr pointer.
I believe this will avoid ospfd crashing on Solaris 8, which seems to
define IP_RECVIF but not actually implement it.
|
|
* sockopt.c: (setsockopt_ipv4_ifindex) Improve error message.
When neither IP_PKTINFO nor IP_RECVIF is defined, make return value
deterministic (-1).
|
|
* thread.c: (funcname_thread_add_timer_msec) Reduce overflow risk.
|
|
* stream.c: Dont allocate streams with 0 sized data buffers
|
|
* if.h: Add more 'non-generic' IFF_ flags.
* if.c: IFF_NOXMIT/IFF_VIRTUAL interfaces are 'loopback like'
|
|
* command.c: (do_echo) Added new "echo" command, useful for
watchdog pinging to make sure the daemon is responsive.
|
|
* 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.
|
|
* sigevent.c: (trap_default_signals) Ignore SIGPIPE instead of exiting.
|
|
* log.c: (zlog_signal,_zlog_assert_failed) Change logging level back to
LOG_ERR instead of LOG_EMERG.
|
|
* log.c: (hex_append) No need to include this function if
HAVE_GLIBC_BACKTRACE is not defined.
|
|
(only used if HAVE_GLIBC_BACKTRACE, so perhaps ifdef it?)
|
|
* prefix.c: (prefix_copy) Error message before abort should
have severity LOG_ERR, not LOG_INFO.
* memory.c: (mtype_log) Log level should be LOG_DEBUG, not LOG_INFO.
|
|
* {smux.c,zclient.c}: Change level of debug messages to LOG_DEBUG.
|
|
* command.c: (config_write_host) Note that "log trap" is deprecated
when writing out the config.
|
|
* bgp_main.c: (main) The 2nd argument to openzlog has been removed.
* isis_main.c: (main) The 2nd argument to openzlog has been removed.
* ospf6_main.c: (main) The 2nd argument to openzlog has been removed.
Note that stdout logging will no longer be enabled by default when
not running as a daemon.
* ospf_main.c: (main) The 2nd argument to openzlog has been removed.
* rip_main.c: (main) The 2nd argument to openzlog has been removed.
* ripng_main.c: (main) The 2nd argument to openzlog has been removed.
* main.c: (main) The 2nd argument to openzlog has been removed.
So stdout logging will no longer be enabled by default.
* irdp_main.c: (irdp_finish) Reduce severity of shutdown message
from LOG_WARNING to LOG_INFO.
* vtysh.c: Make several functions static instead of global.
Added several commands to support destination-specific logging levels.
(vtysh_completion) This function is unused, so comment it out.
* basic.texi: Document new logging features. Separate basic config
commands from basic VTY commands.
* log.h: Replace struct zlog flags and maskpri fields with maxlvl
array to support individual logging levels for each destination.
Remove the 2nd argument to openzlog since the default logging config
should be standardized inside the library. Replaced the
zlog_set_flag and zlog_reset_flag functions with zlog_set_level.
And zlog_set_file now requires an additional log_level argument.
Declare zlog_proto_names for use inside command.c in the
"show logging" command. Added defines useful for command
construction.
* log.c: (vzlog) Decide where to send the message based on the
individual logging levels configured for each destination.
Remove support for ZLOG_STDERR since it was never actually used.
Support record-priority for terminal monitors.
(zlog_signal,zlog_backtrace_sigsafe) Support destination-specific
logging levels. Remove stderr support (was never used). Added
support for terminal monitor logging.
(_zlog_assert_failed) Increase message severity to LOG_EMERG.
(openzlog) Remove 2nd argument since default config should be
standardized in library. By default, terminal monitoring
is set to debug, and all other logging is disabled.
(zlog_set_flag,zlog_reset_flag) Removed.
(zlog_set_level) New function to replace zlog_set_flag and
zlog_reset_flag. Supports destination-specific logging levels.
(zlog_set_file,zlog_reset_file) Support file-specific logging level.
(zlog_rotate) Log an error message if fopen fails, and support
new file-specific logging level.
* command.h: Change DEFUN_CMD_FUNC_DECL and DEFUN_CMD_FUNC_TEXT so that
command functions will be static instead of global. Remove
declarations for config_exit and config_help. Define new macros
DEFUNSH_ATTR, DEFUNSH_HIDDEN, and DEFUNSH_DEPRECATED so we can
have deprecated commands in vtysh. Similarly, for completeness,
define macros ALIAS_SH, ALIAS_SH_HIDDEN, and ALIAS_SH_DEPRECATED.
Also, fix bug in ALIAS_ATTR macro (didn't matter because it
was never used).
* command.c: Make many functions static instead of global.
(facility_name,facility_match,level_match) New functions
to support enhanced destination-specific logging levels.
(config_write_host) Support new destination-specific logging levels.
(config_logmsg) Added new "logmsg" command to help test logging
system.
(show_logging) Added "show logging" command to show the current
configuration of the logging system.
(config_log_stdout_level) Support explicit stdout logging level.
(no_config_log_stdout) Now takes optional LEVEL arg.
(config_log_monitor,config_log_monitor_level,no_config_log_monitor)
New commands creating new "log monitor" commands to set terminal
monitoring log level.
(config_log_file_level) Support explicit file logging level.
(config_log_syslog_level) Support explicit syslog logging level.
(config_log_facility,no_config_log_facility) Implement new
"log facility" command.
(cmd_init) Add hooks for new commands: "show logging", "logmsg",
"log stdout <level>", "log monitor", "log monitor <level>",
"no log monitor", "log file <filename> <level>",
"no log file <filename> <level>", "log syslog <level>",
"log facility", and "no log facility".
* vty.h: Added a "level" argument to vty_log so it can support
"log record-priority". Declare new function vty_log_fixed for
use in signal handlers.
* vty.c: (vty_log,vty_log_out) Added a "level" argument to support
"log record-priority" for vty terminal monitors.
(vty_down_level) Use config_exit_cmd.func instead of calling
config_exit directly (since command functions will now be static
instead of global).
(vty_log_fixed) New function to send terminal monitor messages
from inside a signal handler.
|
|
* HACKING: Indicate that header files should be consulted for
documentation, particularly logging levels in lib/log.h.
* log.h: Document appropriate use of syslog logging priorities
inside quagga.
|
|
|
|
* command.h: Remove fields log_stdout and log_syslog from struct host,
since they are just trying to duplicate information in the
zlog_default structure. Note that this fixes a bug since those
fields were not registering any logging that was established
in the initial call to openzlog (this affects only the zebra and
ospf6d daemons). It is probably a bug to turn on any logging by
default in the call to openzlog.
* command.c: (config_write_host) Get logging info from zlog_default
instead of now-removed fields host.log_stdout and host.log_syslog.
(config_log_stdout,no_config_log_stdout) Do not set now-removed field
host.log_stdout, since this info is recorded in zlog_default.
(config_log_file) Use XSTRDUP (instead of strdup) to set host.logfile.
(config_log_syslog,config_log_syslog_facility,no_config_log_syslog)
Do not set now-removed field host.log_syslog, since this info is
recorded in zlog_default.
|
|
* bgp_main.c: (sigint) Use zlog_notice for termination message.
(main) Use zlog_notice for startup announcement.
* isis_main.c: (sigint,sigterm) Use zlog_notice for termination message.
(terminate) This function should be static, not global.
(main) Use zlog_notice for startup announcement, and remove
ifdef ZEBRA_VERSION.
* version.h.in: Remove declaration for pid_output_lock, this function
is now static, not global.
* pid_output.c: (pid_output_lock) This function should be static, not
global. And remove "old umask" error message, since it was really
an unimportant debug message, not an error.
(pid_output) Need to declare static function pid_output_lock.
* ospf6_main.c: (sigint,sigterm) Use zlog_notice for termination
message.
(main) Remove commented-out call to pid_output_lock (which should
never be called other than from inside pid_output). And use
zlog_notice to print the startup message, which now includes
the vty port.
* ospf_main.c: (sigint) Use zlog_notice for termination message.
(main) Issue a startup announcement using zlog_notice.
* rip_main.c: (sigint) Use zlog_notice for termination message.
(main) Add a startup announcement using zlog_notice.
* ripng_main.c: (sighup) Remove spurious terminating message.
(sigint) Use zlog_notice for termination message.
(main) Issue a startup announcement using zlog_notice.
* main.c: (sigint) Use zlog_notice for termination message.
(main) Add a startup announcement using zlog_notice.
|
|
on systems where /dev/log is a unix datagram socket.
|
|
* log.h: Remove several unused fields from struct zlog. Add comments
for other fields, and add one new field syslog_options that is
used in the new syslog_sigsafe implementation.
* log.c: (syslog_sigsafe) New function to send syslog messages in
an async-signal safe way that can be used inside a signal handler.
(syslog_connect) New function to connect to syslog daemon inside a
signal handler. This function supports only systems where /dev/log
is a unix datagram socket (e.g. not Solaris).
(zlog_signal) Call syslog_sigsafe if syslog logging is enabled.
(zlog_backtrace_sigsafe) Call syslog_sigsafe if syslog logging is
enabled.
(openzlog) Save syslog_options for use in syslog_sigsafe.
(num_append) Fix bug: handle 0 properly.
(hex_append) New function to print a u_long in hex format.
|
|
|
|
* log.c, log.h, memory.c: Change function name from zlog_backtrace_safe
to the more self-explanatory zlog_backtrace_sigsafe.
|
|
* debug.[ch]: Remove unused files.
* Makefile.am: Remove references to debug.c and debug.h
* ospf_main.c: Remove #include "debug.h" (was not being used, and
lib/debug.h has now been deleted).
|
|
* log.c: (zlog_backtrace) New function to log a backtrace.
(zlog_backtrace_safe) Log a backtrace in an async-signal-safe way.
Unfortunately, this function does not support syslog logging yet.
(zlog_signal) Move backtrace code into separate function
zlog_backtrace_safe.
(_zlog_assert_failed) Call zlog_backtrace before aborting.
* log.h: Declare new functions zlog_backtrace and zlog_backtrace_safe.
* memory.c: (zerror) Call zlog_backtrace before aborting.
|
|
* Makefile.am: Need to add zassert.h to pkginclude_HEADERS.
|
|
to stdarg handling.
|
|
* zebra.h: If not C99 and there's no va_copy macro and there is
a __va_copy macro, define va_copy as __va_copy.
|
|
* pid_output.c: (pid_output_lock) Fix 2 bugs: when locking, should
set l_whence to SEEK_SET, not SEEK_END. And after writing new
pid to file, must ftruncate to eliminate any extraneous bytes left
over from the last time a pid was written.
|
|
to be safe.
|
|
|
|
* zassert.h: New header file to declare a quagga-specific assert macro.
* log.c: (_zlog_assert_failed) New function called when assert fails
to log the error and abort.
* zebra.h: Include "zassert.h" instead of <assert.h>.
* regex.c: Include "zassert.h" instead of <assert.h>.
* dict.c: Include "zassert.h" instead of <assert.h>.
|
|
* sigevent.c: (signal_init) Set up some default signal handlers
so that processes will issue an error message before terminating
or dumping core.
(trap_default_signals) New function to set up signal handlers
for various signals that may kill the process.
(exit_handler) Call zlog_signal, then _exit.
(core_handler) Call zlog_signal, then abort.
* log.h: Declare new function zlog_signal.
* log.c: (zlog_signal) New function to log information about
a received signal before the process dies. Try to log a
backtrace also.
(quagga_signal_handler,signal_set) Should be static.
|
|
* log.c: (vzlog) Take a single va_list argument and use va_copy
as necessary for multiple traversals.
(zlog) Pass only one va_list to vzlog.
(zlog_*,plog_*) Use a macro for boilerplate code; pass only one
va_list to vzlog.
(zlog_set_file) Remove unused 2nd argument (flags).
(zlog_save_cwd,zlog_get_cwd,zlog_free_cwd) Remove unused functions.
* log.h: Remove ZLOG_*_INDEX defines (no longer used).
Remove unused 2nd argument from zlog_set_file prototype.
Fix prototype for zlog_rotate.
* command.c: (config_log_file) Remove unused 2nd arg to zlog_set_file.
* vty.c: (vty_out) Fix stdarg usage to perform multiple traversals
properly.
(vty_log) Must use va_copy for multiple traversals of va_list arg.
|
|
* global: Replace strerror with safe_strerror. And vtysh/vtysh.c
needs to include "log.h" to pick up the declaration.
|
|
|
|
* log.c: (safe_strerror) New function: safe wrapper for strerror.
|
|
* sockopt.c: (setsockopt_so_recvbuf) Stop error message from being
printed every time.
|
|
* memory.h: Fix prototype for memory_init().
* memory.c: Declare many functions and data structures static instead
of global. Fix prototype for memory_init().
|
|
in lib/zebra.h, ensure that RFC3542-required CMSG_SPACE and CMSG_LEN
are defined. Warn if alignment assumptions are made, since they are
i386-centric.
in lib/sockopt.h, declare that sockopt sizes are without
CMSG_SPACE-required padding - just simple sizeof.
in ospfd/ospf_packet.c, simply use CMSG_SPACE
This should remove all instances of CMSG_ALIGN from the source code.
This is a nonstandard, though rational, construct; quagga should use
only those defines in RFC3542.
|
|
* memory.c: (zerror) Use zlog_err instead of fprintf to stderr.
Instead of exiting, log currenty memory usage and then abort.
(log_memstats) New function to log memory statistics, called by
zerror.
(show_memory_all) Loop over new mlists array instead of calling
show_memory_vty separately for each memory_list.
|
|
|