+2004-12-17 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * command.c: (do_echo) Added new "echo" command, useful for
+ watchdog pinging to make sure the daemon is responsive.
+
+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.
+
+2004-12-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * sigevent.c: (trap_default_signals) Ignore SIGPIPE instead of exiting.
+
+2004-12-10 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * log.c: (zlog_signal,_zlog_assert_failed) Change logging level back to
+ LOG_ERR instead of LOG_EMERG.
+
+2004-12-09 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * log.c: (hex_append) No need to include this function if
+ HAVE_GLIBC_BACKTRACE is not defined.
+
+2004-12-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * 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.
+
+2004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * {smux.c,zclient.c}: Change level of debug messages to LOG_DEBUG.
+
+2004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * command.c: (config_write_host) Note that "log trap" is deprecated
+ when writing out the config.
+
+2004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * 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.
+
+2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * log.h: Document appropriate use of syslog logging priorities
+ inside quagga.
+
+2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * 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.
+
+2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * 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.
+
+2004-11-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * 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.
+
+2004-11-28 Hasso Tepper <hasso at quagga.net>
+
+ * command.h: DEFUN_DEPRECATED passes attribute to DEFUN as well.
+
+2004-11-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * log.c, log.h, memory.c: Change function name from zlog_backtrace_safe
+ to the more self-explanatory zlog_backtrace_sigsafe.
+
+2004-11-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * debug.[ch]: Remove unused files.
+ * Makefile.am: Remove references to debug.c and debug.h
+
+2004-11-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * 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.
+
+2004-11-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * Makefile.am: Need to add zassert.h to pkginclude_HEADERS.
+
+2004-11-25 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * 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.
+
+2004-11-25 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * 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.
+
+2004-11-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * 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>.
+
+2004-11-23 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * 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.
+
+2004-11-23 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * 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.
+
+2004-11-19 David Young <dyoung@pobox.com>
+
+ * log.c: (safe_strerror) New function: safe wrapper for strerror.
+
+2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * sockopt.c: (setsockopt_so_recvbuf) Stop error message from being
+ printed every time.
+
+2004-11-16 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * memory.h: Fix prototype for memory_init().
+ * memory.c: Declare many functions and data structures static instead
+ of global. Fix prototype for memory_init().
+
+2004-11-15 Greg Troxel <gdt@fnord.ir.bbn.com>
+
+ * sockopt.h: Avoid CMSG_ALIGN, and declare that sizes are without
+ alignment (users should use CMSG_SPACE).
+
+ * zebra.h: Rationalize CMSG_SPACE compatibility defines. Warn if
+ asumming 4-byte alignment, since this isn't safe.
+
+2004-11-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * 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.
+
+2004-11-08 Paul Jakma <paul@dishone.st>
+
+ * buffer.c: Add missing include of log.h.
+ (buffer_flush_available) written is compared against
+ mostly against unsigned types, only for the writev do we need
+ signed compare, so declare it as size_t and cast it to ssize_t
+ just for the error compare when we've called writev.
+ * buffer.h: Add comment that buffer data sizes really should be
+ size_t.
+
+2004-11-07 Paul Jakma <paul@dishone.st>
+
+ * version.h.in: add autoconf configure_input output var
+
+2004-11-04 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * vty.h: Remove fields in struct vty that were related to VTY_CONTINUE
+ capabilities (that were used only in bgpd/bgp_route.c and are now
+ removed). Also remove some other fields that were not being
+ used at all.
+ * vty.c: (vty_execute) Do not test for obsolete status values VTY_START
+ and VTY_CONTINUE.
+ (vty_read) Remove calls to vty->output_func since that was part
+ of the VTY_CONTINUE infrastructure that has been removed.
+ (vty_flush) Remove code to support VTY_START and VTY_CONTINUE.
+ (vty_close) Remove code to cancel vty->t_output thread, since that
+ thread was never actually used.
+
+2004-11-04 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * vty.c: Vtysh connections to daemons should use buffering.
+ (vty_out) Remove exception for vty_shell_serv, just use buffer_write.
+ (vty_new) Increase output buffer size to 4096 rounded up to a
+ multiple of pagesize.
+ (vtysh_read) After command has been executed and all output buffered,
+ call buffer_flush_available and schedule further writes if the
+ buffers are not yet empty.
+ (vtysh_write) New function to flush output to vtysh when the socket
+ is writeable.
+ (vty_event) Added new VTYSH_WRITE event for flushing buffers to vtysh
+ clients. Also, should save read thread in vty->t_read so the
+ thread can be cancelled in vty_close.
+ * buffer.h: In struct buffer_data, remove unused "parent" field.
+ Convert "unsigned char *data" to "unsigned char data[0]" to save
+ a malloc. Declare new function buffer_flush_available that works
+ with non-blocking sockets.
+ * buffer.c: (buffer_data_new) Use a single malloc now that data is
+ a variable-size array at end of structure.
+ (buffer_data_free) Just a single free now that data is part of the
+ structure.
+ (buffer_write) Simplify the logic to make behavior more transparent.
+ (buffer_flush) Decrease b->length as data is written out.
+ (buffer_flush_vty_all) Decrease b->length as buffers are freed.
+ (buffer_flush_vty) Decrease b->length as data is written out.
+ (buffer_flush_available) New function to flush non-blocking sockets.
+
+2004-11-01 Paul Jakma <paul@dishone.st>
+
+ * sockopt.c: (setsockopt_pktinfo) remove, its unused.
+
+2004-10-31 Paul Jakma <paul@dishone.st>
+
+ * vty.c: As per Andrew's suggestions..
+ (vty_serv_un) remove flags.
+ (vtysh_accept) close socket if we cant set NONBLOCK. Add flags.
+ * keychain.c: Convert some more strtoul users to VTY_GET_INTEGER.
+ * memory.h: Add MTYPE_THREAD_FUNCNAME and MTYPE_THREAD_STATS
+ * thread.c: Update stats and funcname alloc/free to use previous
+ specific memory type defines. Use XCALLOC and sizeof the type,
+ not the pointer.
+ * smux.c: fix int to size_t compile warnings
+
+2004-10-29 Paul Jakma <paul@dishone.st>
+
+ * vty.c: Move setting of sock to O_NONBLOCK from vty_serv_un
+ to vtysh_accept, where sock is the actual fd we wanted to set to
+ O_NONBLOCK, ie the /connected/ vtysh unix socket.
+
+2004-10-23 Hasso Tepper <hasso at quagga.net>
+
+ * zclient.c: Unbreak reading interface update message. Might fix
+ blocker bugzilla #109.
+
+2004-10-22 Paul Jakma <paul@dishone.st>
+
+ * sockopt.c: (getsockopt_ipv4_ifindex) no ifindex should be 0, not
+ -1.
+ (setsockopt_pktinfo) unexported
+ * sockopt.h: Cleanup SOCKOPT_CMSG defines a bit. Add a throwaway
+ define for SOPT_SIZE_CMSG_IFINDEX_IPV4 for systems which have
+ neither IP_RECVIF nor IP_PKTINFO (eg openbsd), thanks to Rivo
+ Nurges for highlighting problem and fix.
+ Fix elif that should be an else.
+ * command.h: Cleanup the defines a bit, add helper defines and
+ collapse all defines to use those. Add an attribute field to
+ cmd_element to support, eg hidden or deprecated commands, add
+ defun defines for such. All that's left to do is add logic
+ to command.c to check these attributes... ;)
+ * zebra.h: reserve ZEBRA_ROUTE_HSLS
+
+2004-10-19 Hasso Tepper <hasso at quagga.net>
+
+ * version.h.in: Define copyright string QUAGGA_COPYRIGHT.
+ * print_version.c: Remove. print_version () function moved to
+ command.[c|h].
+ * command.c: Use QUAGGA_COPYRIGHT.
+ * Makefile.am: Remove useless version.c and print_version.c files.
+
+2004-10-19 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * zclient.c: (zebra_interface_address_read) If the destination address
+ is encoded as all zeroes, load it as a NULL pointer.
+ * if.h: Add comment describing struct connected destination field
+ and indicating that it may be NULL. Define macros
+ CONNECTED_DEST_HOST and CONNECTED_POINTOPOINT_HOST to help
+ with PtP logic (distinguish between host and subnet addressing).
+ * if.c: (if_lookup_address) Fix PtP logic to handle subnet addressing
+ properly,
+ (connected_lookup_address) ditto.
+ (connected_add_by_prefix) Handle case where destination is NULL,
+ * prefix.[c|h]: New functions ipv4_network_addr and
+ ipv4_broadcast_addr.
+
+2004-10-13 Hasso Tepper <hasso at quagga.net>
+
+ * command.c: Make CMD_ERR_NOTHING_TODO nonfatal if reading
+ configuration from file. Fixes critical bugzilla #113.
+ * smux.c, smux.h: Remove all defaults to initialize smux connection to
+ snmpd by default even if not configured to do so. "smux peer OID
+ <password>" initializes now connection and "no smux peer" terminates
+ it.
+
+2004-10-13 Paul Jakma <paul@dishone.st>
+
+ * (global) more const'ification.
+ * sockunion.c: (sockunion_su2str) buffer should be sized
+ SU_ADDRSTRLEN.
+ (sockunion_log) do not return stack variables, strdup buf before
+ return.
+ * vty.h: Fix up the VTY_GET_INTEGER macros. Testing caller supplied
+ values against ULONG_MAX is daft, when caller probably has passed
+ a type that can not hold ULONG_MAX. use a temporary long instead.
+ Add VTY_GET_LONG, make VTY_GET_INTEGER_RANGE use it, make
+ VTY_GET_INTEGER a define for VTY_GET_INTEGER_RANGE.
+
+2004-10-11 Hasso Tepper <hasso at quagga.net>
+
+ * command.h: Sync DEFUNSH with other macros.
+ * sockunion.c, sockunion.h: More const strings.
+
+2004-10-11 Paul Jakma <paul@dishone.st>
+
+ * thread.c: (funcname_thread_add_timer)
+ (funcname_thread_add_timer_msec) Fix mistakes from last change.
+ Pointed out by Liu Xin in [quagga-dev 1609].
+ * if.h: mtu's should be unsigned.
+ * routemap.{c,h}: const char updates
+ * smux.{c,h}: ditto
+
+2004-10-10 Paul Jakma <paul@dishone.st>
+
+ * version.h.in: (pid_output*) add const qualifier.
+ * command.h: Change DEFUN func to take const char *[] rather
+ than char **, to begin process of fixing compile warnings in lib/.
+ Nearly all other changes in this commit follow from this change.
+ * buffer.{c,h}: (buffer_write) pointer-arithmetic is gccism, take
+ const void * and cast an automatic const char *p to it.
+ (buffer_putstr) add const
+ * command.c: (zencrypt) const qualifier
+ (cmd_execute_command_real) ditto
+ (cmd_execute_command_strict) ditto
+ (config_log_file) ditto.
+ Fix leak of getcwd() returned string.
+ * memory.{c,h}: Add MTYPE_DISTRIBUTE_IFNAME for struct dist ifname.
+ * distribute.{c,h}: Update with const qualifier.
+ (distribute_free) use MTYPE_DISTRIBUTE_IFNAME
+ (distribute_lookup) Cast to char *, note that it's ok.
+ (distribute_hash_alloc) use MTYPE_DISTRIBUTE_IFNAME.
+ (distribute_get) Cast to char *, note that it's ok.
+ * filter.c: Update with const qualifier.
+ * if.{c,h}: ditto.
+ * if_rmap.{c,h}: ditto.
+ (if_rmap_lookup) Cast to char *, note that it's ok.
+ (if_rmap_get) ditto.
+ * log.{c,h}: Update with const qualifier.
+ * plist.{c,h}: ditto.
+ * routemap.{c,h}: ditto.
+ * smux.{c,h}: ditto. Fix some signed/unsigned comparisons.
+ * sockopt.c: (getsockopt_cmsg_data) add return for error case.
+ * vty.c: Update with const qualifier.
+
+2004-10-08 Hasso Tepper <hasso at quagga.net>
+
+ * routemap.c, routemap.h: Make some string arguments const.
+
+2004-10-05 Paul Jakma <paul@dishone.st>
+
+ * version.h.in: print_version declaration is here, not in automake
+ generated version.h.
+
+2004-10-08 Hasso Tepper <hasso at quagga.net>
+
+ * command.c, command.h: Make argument of cmd_make_strvec function
+ const.
+ * command.c: Make hostname commands usable in vtysh again.
+
2004-10-07 Hasso Tepper <hasso at quagga.net>
* command.c, pid_output.c, print_version.c, vty.c, vty.h: Make more