Age | Commit message (Collapse) | Author |
|
2006-03-14 Paul Jakma <paul.jakma@sun.com>
* privs.c: (zprivs_caps_init) Change user IDs before lowering
privileges, while this seems to work on Linux, on Solaris
it rightfully refuses due to PRIV_PROC_SETID having been
dropped.
* command.h: Add the struct host global exported from command.c
|
|
2006-03-30 Paul Jakma <paul.jakma@sun.com>
* command.h: (DEFUN_CMD_FUNC_TEXT) Annotate arguments as
potentially being unused.
|
|
* zebra.h: BSD BYTE_ORDER define isn't available everywhere,
define if needs be.
* checksum.h: new file. checksum.c exports in_cksum, provide
a header for it.
* checksum.c: (in_cksum) callers shouldn't have to know it uses
a u_short internally, change to void *.
* Makefile.am: Add checksum.h
* command.h: remove bogus trailling slash.
* md5.c: (general) Update it for the twentieth century. ANSI
declarations are widely supported now.. Don't include system
headers, only include zebra.h. Use POSIX types (the
alternative is to define u_int64_t in a portable way - rest
of Quagga needs same cleanup).
Make endian-conditional code be compiler conditional rather
than preprocessor conditional, so that breakage gets noticed
quicker.
* md5.h: POSIX types. Get rid of the odd __P() non-ANSI capable
compiler compatibility hack.
|
|
* command.h: (enum node_type) Add BGP_IPV6M_NODE
* command.c: (node_parent) Handle BGP_IPV6M_NODE node
(config_exit, config_end) ditto
* vty.c: (vty_end_config) Handle BGP_IPV6M_NODE node
|
|
* (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
|
|
* command.c: (cmd_describe_command_real) sign compile warning fix
(cmd_complete_command_real) ditto.
(config_list_cmd) Don't list hidden or deprecated commands,
hiding these from tab completion is still to be done.
* command.h: cmd attr enum should start at 1.
|
|
* vty.c: (vty_hello) display motd file, if set
* command.h: add char *motdfile to struct host
* command.c: (config_write_host) write out motdfile config
(banner_motd_file_cmd) new command, allow motd to be read from
file.
(no_banner_motd_cmd) free motdfile string, if needs be.
(cmd_init) init (struct host).motdfile. Add new motd file
commands.
|
|
* 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.
|
|
use it as well.
* vtysh/vtysh.c: Implement walkup in node tree for vtysh as it already
works in vty.
|
|
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.
[pullup candidate]
|
|
* 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.
|
|
* 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.
|
|
|
|
* 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... ;)
|
|
|
|
* (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.
|
|
|
|
* 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.
|
|
|
|
added to strings and a lot of int -> unsigned int changes.
|
|
|
|
- add privs support
- use misc quagga's definitions
- make it compile"able"
- fix segfault cases related to hostname()
- add debug isis xxx command
This patch has been approved by Paul Jakma.
|
|
|