summaryrefslogtreecommitdiff
path: root/zebra/ChangeLog
AgeCommit message (Collapse)Author
2005-09-28 * connected.c: flag connected_up_ipv6() and connected_down_ipv6()vincent
usage with HAVE_IPV6
2005-09-24 * rib.h: Add note about behaviour of rib_add_ipv[46]* functions -hasso
add is treated as implicit withdraw.
2005-09-21 * zebra_rib.c: Reduce the height of some staircases. Fixhasso
rib_delete_ipv6() to match routes in the RIB by their gateway as well as by destination.
2005-09-212005-09-21 Paul Jakma <paul.jakma@sun.com>paul
* zebra_rib.c: (static_uninstall_ipv{4,6}) Fix regression wrt removal of static routes with multiple-hops introduced with the workqueue conversion. We should free the relevant nexthop and then get rib_process to run, otherwise we just get same static route back again (with no way to unconfigure it, because its already deleted from configuration).
2005-09-122005-09-12 Paul Jakma <paul.jakma@sun.com>paul
* (general) RTM_CHANGE and implicit withdraw on RTM_NEWADDR support. * connected.c: (connected_withdraw) new function. withdraw a connected subnet address set from zebra, and pass information along to clients. (connected_announce) similar, but to announce a new connected subnet address set. (connected_check_ipv4) renamed to connected_check, as its AFI independent. (connected_add_ipv{4,6}) Remove the connected address announce stuff, use connected_announce instead. If connected_check indicates address is already present, treat it as an implicit withdraw of the existing address, ie remove the old address details and replace with the new details. (connected_delete_ipv{4,6}) Use connected_withdraw. (connected_check_ipv6) deleted in favour of connected_check. * connected.h: Rename connected_check_ipv4 to connected_check. delete connected_check_ipv6. * interface.c: Use connected_check rather than the AFI specific symbols. * kernel_socket.c: (rtm_read) RTM_CHANGE support. Create a rib delete event for the existing route, before adding route again. (kernel_read) we can handle RTM_CHANGE now.
2005-08-27 * zebra_rib.c, rib.h: Add distance and metric arguments to thehasso
rib_add_ipv6() function so that IPv6 routes in RIB can have correct metric. No IPv6 routing daemon uses distance yet though. * zserv.c, connected.c, kernel_socket.c, rt_netlink.c, rtread_proc.c,zserv.c: Pass metric and distance info to the rib_add_ipv6(). Forwardport from stable branch.
2005-07-292005-07-29 Paul Jakma <paul.jakma@sun.com>paul
* interface.c: (if_delete_update) should always be available, not just on RTM_IFANNOUNCE/NETLINK systems. * kernel_socket.c: (ifan_read) only call if_delete_update when interface departs, dont if_delete, because we wish to retain interface configuration state even when interfaces are removed. (ifm_read) If we dont have RTM_IFANNOUNCE, then transitioning to down state is only chance we have to clean up interface in case it is deleted (eg Solaris down -> unplumb -> plumb up). * redistribute.c: (zebra_interface_delete_update) should always be available, we /will/ call it now on all systems, via if_delete_update. * zserv.c: (zsend_interface_delete) ditto (zsend_interface_address) Update the call-flow diagramme, to reflect that if_delete_update /is/ now called on all systems, potentially. * zserv.h: (zsend_interface_delete) unconditionally exported, as above.
2005-06-282005-06-28 Paul Jakma <paul.jakma@sun.com>paul
* kernel_socket.c: (RTA_{ADDR,ATTR}_GET) fix mistake, NULL check should be on DEST argument
2005-06-282005-06-28 Paul Jakma <paul.jakma@sun.com>paul
* (global) Extern and static'ification, with related fixups of declarations, ensuring files include their own headers, etc. if_ioctl.c: (interface_info_ioctl) fix obvious arg mis-order in list loop
2005-06-142005-06-14 Paul Jakma <paul.jakma@sun.com>paul
* kernel_socket.c: consolidate the IFAM{ADDR,MASK}GET and RTM{ADDR,MASK}GET macros into generic rta_addrs macros, RTA_{ADDR,ATTR}_GET. (af_check) could use 'inline' attribute (ifam_read_mesg) remove IFAM{ADDR,MASK}GET macro, change to generic macro. (rtm_read_mesg) similar
2005-06-12 * rt_netlink.c: Remove unused netlink-addr socket declaration.hasso
* rt_netlink.c (netlink_parse_info): Fix debug messages - nlmsg_pid is unsigned and one zlog call had swapped arguments. * rt_netlink.c (netlink_route_multipath): Fix compile with disabled IPv6 support. [backport candidate] - with stuff commited to rt_netlink.c before to fix logging in netlink_route_multipath().
2005-05-312005-05-31 Paul Jakma <paul.jakma@sun.com>paul
* zserv.c: (zsend_route_multipath) Fix bug if route is sent with no NEXTHOP_FLAG_FIB nexthops. As ZAPI_MESSAGE_IFINDEX and ZAPI_MESSAGE_NEXTHOP are always set, clients would try read non-existent nexthop information and hit stream assert. Zserv is still broken for multi-nexthop messages, but it always was.
2005-05-062005-05-06 Paul Jakma <paul.jakma@sun.com>paul
* zserv.h: Remove ZEBRA_PORT definition, its in lib/zebra.h now
2005-04-282005-04-28 Paul Jakma <paul.jakma@sun.com>paul
* 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.
2005-04-102005-04-10 Paul Jakma <paul@dishone.st>paul
* if_ioctl_solaris.c: (if_lookup_linklocal) fix order of args in ALL_LIST_ELEMENTS_RO macro.
2005-04-102005-04-10 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* zserv.c (zebra_client_read): Fix bug: first read attempt should read ZEBRA_HEADER_SIZE minus the number of bytes already read. Improve efficiency by maintaining a calculation of the number of bytes read instead of calling stream_get_endp multiple times. If message length is too small, issue a warning message (not debug) before closing the connection. And also check that message length is not too big.
2005-04-09 * rt_netlink.c: One tiny missing comma caused pointless debug messageshasso
about IPv6 nexthops.
2005-04-09 * rt_netlink.c (netlink_parse_info): Fix warning. It's safe to casthasso
status to unsigned here, because we already checked that it isn't negative or 0. * rt_netlink.c (netlink_interface_addr): Prefix length belongs to the address, not to the interface. * rt_netlink.c (netlink_route_multipath): Fix debug. No useless info is printed out now and IPv6 info is handeled.
2005-04-052004-04-05 Paul Jakma <paul@dishone.st>paul
* lib/vty.c: Improve logging of failures to open vty socket(s). See bugid #163. * zebra/zserv.c: print more helpful errors when we fail to successfully bind and listen on zserv socket. Closes bugzilla #163.
2005-04-032005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* if_ioctl.c: (interface_list_ioctl) Use if_get_by_name_len. * if_proc.c: (ifaddr_proc_ipv6) Increase size of ifname buffer to avoid overflow. * kernel_socket.c: (ifan_read) Use if_get_by_name_len. * if.h: Fix comments to reflect that if_lookup_by_name and if_get_by_name now require the argument strings to be NUL-terminated. * if.c: (if_lookup_by_name) Compare using strcmp. (if_get_by_name) Pass strlen(ifname) as 2nd arg to if_create.
2005-04-022005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* if.h: (if_lookup_by_name_len, if_get_by_name_len) New functions. * if.c: (if_lookup_by_name_len, if_get_by_name_len) New functions. (if_get_by_name) Tighten up code. (interface) Use new function if_get_by_name_len. * zclient.c: (zebra_interface_add_read) Use new if_get_by_name_len function. (zebra_interface_state_read) Use new if_lookup_by_name_len function. * kernel_socket.c: (ifm_read) Use new if_lookup_by_name_len function to save a memcpy. * if_ioctl_solaris.c: (interface_list_ioctl) Fix subtle bug with new if_get_by_name_len function. * ospf_interface.c: (ospf_vl_new) Use strnlen to fix call to if_create.
2005-04-022005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
Fix problems when netlink interfaces are renamed (same ifindex used for a new interface). Start cleaning up some problems with the way interface names are handled. * interface.c: (if_new_intern_ifindex) Remove obsolete function. (if_delete_update) After distributing the interface deletion message, set ifp->ifindex to IFINDEX_INTERNAL. (if_dump_vty) Detect pseudo interface by checking if ifp->ifindex is IFINDEX_INTERNAL. (zebra_interface) Check return code from interface_cmd.func. Do not set internal ifindex values to if_new_intern_ifindex(), since we now use IFINDEX_INTERNAL for all pseudo interfaces. * kernel_socket.c: (ifm_read) Fix code and comments to reflect that all internal interfaces now have ifp->ifindex set to IFINDEX_INTERNAL. * rt_netlink.c: (set_ifindex) New function used to update ifp->ifindex. Detects interface rename events by checking if that ifindex is already being used. If it is, delete the old interface before assigning the ifindex to the new interface. (netlink_interface, netlink_link_change) Call set_ifindex to update the ifindex. * if.h: Remove define for IFINDEX_INTERNBASE and add define IFINDEX_INTERNAL 0, since all internal (i.e. non-kernel) pseudo- interfaces should have ifindex set to 0. (if_new) Remove function. (if_delete_retain) New function to delete an interface without removing from iflist and freeing the structure. (ifname2ifindex) New function. * if.c: (if_new) Remove function (absorb into if_create). (if_create) Replace function if_new with call to calloc. Set ifp->ifindex to IFINDEX_INTERNAL. Fix off-by-one error in assert to check length of interface name. Add error message if interface with this name already exists. (if_delete_retain) New function to delete an interface without removing from iflist and freeing the structure. (if_delete) Implement with help of if_delete_retain. (ifindex2ifname) Reimplement using if_lookup_by_index. (ifname2ifindex) New function to complement ifindex2ifname. (interface) The interface command should check the name length and fail with a warning message if it is too long. (no_interface) Fix spelling in warning message. (if_nametoindex) Reimplement using if_lookup_by_name. (if_indextoname, ifaddr_ipv4_lookup) Reimplement using if_lookup_by_index. * bgp_zebra.c: (bgp_interface_delete) After deleting, set ifp->ifindex to IFINDEX_INTERNAL. * isis_zebra.c: (isis_zebra_if_del) Call if_delete_retain instead of if_delete, since it is generally not safe to remove interface structures. After deleting, set ifp->ifindex to IFINDEX_INTERNAL. (zebra_interface_if_lookup) Tighten up code. * ospf6_zebra.c: (ospf6_zebra_if_del) Previously, this whole function was commented out. But this is not safe: we should at least update the ifindex when the interface is deleted. So the new version updates the interface status and sets ifp->ifindex to IFINDEX_INTERNAL. (ospf6_zebra_route_update) Use if_indextoname properly. * ospf_vty.c: (show_ip_ospf_interface_sub) Show ifindex and interface flags to help with debugging. * ospf_zebra.c: (ospf_interface_delete) After deleting, set ifp->ifindex to IFINDEX_INTERNAL. (zebra_interface_if_lookup) Make function static. Tighten up code. * rip_interface.c: (rip_interface_delete) After deleting, set ifp->ifindex to IFINDEX_INTERNAL. * ripng_interface.c: (ripng_interface_delete) After deleting, set ifp->ifindex to IFINDEX_INTERNAL.
2005-03-31 * rt_netlink.c (netlink_talk_filter): Show always warning message,hasso
it's not for debug. * rt_netlink.c (netlink_talk): Don't assume we use netlink_cmd although we do now actually. * rt_netlink.c (netlink_route, netlink_route_multipath): Always use netlink_cmd to send messages to the kernel. [backport candidate]
2005-03-302005-03-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* irdp.h: Add prototype for irdp_sock_init, and fix protos for other irdp_* functions. * irdp_interface.c: (irdp_if_start) If irdp_sock is negative, call irdp_sock_init to create the IRDP socket. (irdp_if_init) Rename to irdp_init(). (get_iflist_ifp) Remove function that is a duplicate of if_lookup_by_index. (*) Make many functions static. And remove superfluous "\n" from several zlog messages. * irdp_main.c: (irdp_init) Remove function that used to call irdp_if_init() and irdp_sock_init(), since we will now create the socket only upon first use. (irdp_sock_init) Do not update global irdp_sock variable, just return the fd and assume that the caller will do so. If setsockopt calls fail, close the socket before returning -1. (*) Make many functions static. * irdp_packet.c: Initialize irdp_sock to -1. (irdp_read_raw) Call standard library function if_lookup_by_index instead of get_iflist_ifp. (irdp_recvmsg) Should be static, not global.
2005-03-292005-03-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* rt_netlink.c: (netlink_link_change) If the status of an operative interface changes (e.g. MTU changes), the client daemons should be notified by calling zebra_interface_up_update. Previously, the information was being updated in zebra's interface structure, but the clients were not notified of changes to an operative interface. * ospf_zebra.c: (ospf_interface_state_up) If the MTU of an operative interface changes, print a debug message and call ospf_if_reset() to simulate down/up on the interface. * ospf_interface.h: Declare new function ospf_if_reset(). * ospf_interface.c: (ospf_if_reset) New function to call ospf_if_down and ospf_if_up for all ospf interfaces attached to an interface.
2005-03-252005-03-25 Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>vincent
* interface.c, interface.h, rtadv.c, rtadv.h: extensions to Neighbor discovery for Mobile IPv6.
2005-03-13 * zebra/interaface.c: "show interface description" commandhasso
implemented.
2005-03-122005-03-12 Paul Jakma <paul@dishone.st>paul
* rt_netlink.c: (netlink_route_multipath) dont set equalise flag. No stock Linux kernel has ever supported it, and even if it had
2005-03-07 * if_proc.c, ipforward_proc.c, rtread_proc.c: Fix fd leaks.hasso
[backport candidate]
2005-03-06 * interface.c: Fix CRC and frame errors statistics in Linux.hasso
2005-02-282005-02-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* zserv.c: Must include network.h and buffer.h for non-blocking I/O. Remove global message_queue and t_write (need separate buffering for each client). (zebra_server_dequeue,zebra_server_enqueue) Remove functions related to old buggy buffering code. (zserv_delayed_close) New thread callback function to delete a client. (zserv_flush_data) New thread callback function to flush buffered data to client. (zebra_server_send_message) Rewritten to use buffer_write (so buffering of writes and non-blocking I/O work properly). (zsend_interface_add,zsend_interface_delete,zsend_interface_address, zsend_interface_update) Return 0 instead of -1 if !client->ifinfo (this is not really an error). Return value from zebra_server_send_message. (zsend_route_multipath,zsend_ipv4_nexthop_lookup, zsend_ipv4_import_lookup) Return value from zebra_server_send_message. (zsend_ipv6_nexthop_lookup) Fix scope to static, and return value from zebra_server_send_message. (zsend_router_id_update) Must use zebra_server_send_message instead of deprecated writen function. Return 0 instead of -1 if this client is not subscribed to router-id updates (since this is not really an error). (zread_interface_add) Change type to static int. If zsend_interface_add fails or zsend_interface_address fails, return -1 immediately (since the client has had an I/O error). (zread_interface_delete,zread_ipv4_add,zread_ipv4_delete, zread_ipv6_add,zread_ipv6_delete,zread_router_id_delete) Return 0 to indicate success. (zread_ipv4_nexthop_lookup) Return value from zsend_ipv4_nexthop_lookup. (zread_ipv4_import_lookup) Return value from zsend_ipv4_import_lookup. (zebra_read_ipv6) Remove unused function. (zread_ipv6_nexthop_lookup) Return value from zsend_ipv6_nexthop_lookup. (zread_router_id_add) Return value from zsend_router_id_update. (zebra_client_close) Call buffer_free(client->wb) and thread_cancel(client->t_suicide). (zebra_client_create) Allocate client->wb using buffer_new. (zebra_client_read) Support non-blocking I/O by using stream_read_try. Use ZEBRA_HEADER_SIZE instead of 3. (zebra_accept) Fix bug: reset accept thread at top. Make client socket non-blocking using the set_nonblocking function. (config_write_forwarding) Fix scope to static. (zebra_init) Remove initialization code for old buggy write buffering. * zserv.h: Add 2 new fields to struct zserv: struct buffer *wb (to enable buffered writes with non-blocking I/), and struct thread *t_suicide to support delayed close on I/O errors. * router-id.h: Remove prototypes for zread_router_id_add and zread_router_id_delete (their scope should be static to zserv.c).
2005-02-242005-02-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* redistribute.c: (zebra_check_addr,is_default, zebra_redistribute_default,zebra_redistribute) Fix scope to be static.
2005-02-20 * rt_netlink.c: Don't show messages "ignoring message type 0x001[89]"hasso
if we are not debugging.
2005-02-192005-02-19 Paul Jakma <paul@dishone.st>paul
* zserv.c: (zebra_read_ipv6) replace the char * arithmetic with STREAM_READABLE.
2005-02-142005-02-14 Paul Jakma <paul@dishone.st>paul
* Not all Linux netlink systems have IFLA_WIRELESS
2005-01-302005-01-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* daemon.c: (daemon) Replace perror with zlog_err. * vty.c: (vty_serv_un) Replace perror with zlog_err. * ripd.c: (rip_create_socket) Replace perror with zlog_err. * ioctl.c: (if_ioctl,if_ioctl_ipv6,if_get_flags) Replace perror with zlog_err. * ioctl_solaris.c: (if_ioctl,if_ioctl_ipv6) Replace perror with zlog_err.
2005-01-292005-01-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* if_ioctl_solaris.c: (interface_list_ioctl) Save errno before calling zserv_privs.change. * ioctl{,_solaris}.c: (if_ioctl,if_ioctl_ipv6) Save errno before calling zserv_privs.change. * ipforward_solaris.c: (solaris_nd) Save errno before calling zserv_privs.change. * irdp_main.c: (irdp_sock_init) Save errno before calling zserv_privs.change. [backport candidate]
2005-01-292005-01-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* rt_netlink.c: (netlink_socket,netlink_request,netlink_parse_info, netlink_talk) Save errno before calling zserv_privs.change. [backport candidate]
2005-01-242005-01-24 Martin Pot <mpot at martybugs.net>paul
* zebra/rt_netlink.c: ignore wireless newlink netlink messages.
2005-01-18 * interface.c: Better statistics output in "show interface" command inhasso
case of /proc being used. I don't have others to test with at the moment.
2005-01-16 * main.c: With --nl-bufsize argument is required.hasso
[pullup candidate]
2005-01-052005-01-05 Paul Jakma <paul@dishone.st>paul
* 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.
2005-01-042005-01-04 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* 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.
2004-12-222004-12-22 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* connected.c: (connected_add_ipv4) Limit warning about /32 addresses with no peer specified to PtP interfaces only.
2004-12-18Fix "show ipv6 route <proto>" command.hasso
2004-12-09Add const to char * to quiet warnings.gdt
Note two warnings in comments. The serious one is that struct interface->ifindex probably needs to be signed, ssince we store and compare to -1.
2004-12-072004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* *.c: Change level of debug messages to LOG_DEBUG.
2004-12-072004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* 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.
2004-12-032004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* 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.
2004-11-25Make group to run daemon as configurable. Fixes #2 from Bugzilla #64.hasso