summaryrefslogtreecommitdiff
path: root/ospfd/ospf_main.c
AgeCommit message (Collapse)Author
2006-10-15[daemon startup] Add --dry-run/-C argument to daemons, to check config file ↵Paul Jakma
syntax 2006-10-04 Oliver Hookins <ohookins@gmail.com> * bgpd/bgp_main.c: Add configuration check option, with '-C' rather than '-c' for consistency between daemons. * isisd/isis_main.c: ditto * ospf6d/ospf6_main.c: ditto * ospfd/ospf_main.c: ditto * ripngd/ripng_main.c: ditto * vtysh/vtysh_main.c: ditto * ripd/rip_main.c: Change the config check option to '-C' and tidy up the code. * zebra/main.c: ditto 2006-10-04 Stergiakis Alexandros <astergiakis@antcor.com> * ripd/rip_main.c: This trivial patch introduces a new command-line option '-c', which instructs zebra/ripd to check its configuration file for validity, print any error message, and then exit. This is useful when the configuration file is edited by hand or otherwise, and you simply want to validate it without any other effect. * zebra/main.c: ditto
2006-01-19[compiler] miscellaneous trivial compiler warning fixespaul
2006-01-19 Paul Jakma <paul.jakma@sun.com> * (general) various miscellaneous compiler warning fixes. Remove redundant break statements from switch clauses which return. return from main, not exit, cause it annoys SOS. Remove stray semi-colons which cause empty-statement warnings. * zebra/main.c: (sighup) remove private declaration of external function.
2005-10-292005-10-29 Paul Jakma <paul.jakma@sun.com>paul
* (general) RFC3137 stub-router support * ospfd.h: Add OSPF_OUTPUT_COST_INFINITE define. (struct ospf_master) Add a OSPF_MASTER_SHUTDOWN flag for options, to allow shutdown to distinguish between complete shutdown and shutdown of a subset of ospf instances. (struct ospf) Add stub_router_{startup,shutdown_}time, configuration of startup and shutdown time for stub-router. Add t_graceful_shutdown struct thread, timer for graceful shutdown, if needed. (struct ospf_area) Add stub_router_state - run time state of stub-router for an area. Add flags for ADMIN, IS and WAS states. Add t_stub_router, timer thread to resend router-lsa for an area. * ospf_lsa.c: (ospf_link_cost) new simple function to spit out either the given lnks cost or infinite cost if stub-router is in effect. (lsa_link_{ptop,broadcast,virtuallink,ptomp}_set) use previous function for transit-links. (ospf_stub_router_timer) timer thread for end of startup stub router. Change state as required for the area and setup re-origination of router-lsa. (ospf_stub_router_check) Check/do whether stub-router should be enabled, and whether it requires timer to be setup. (ospf_router_lsa_new) call previous function at top. (ospf_router_lsa_originate) no external callers, made static. * ospf_lsa.h: (ospf_router_lsa_originate) removed. * ospf_main.c: (sigint) make static. remove call to exit, as ospf_terminate now deals with exiting. * ospf_route.c: (ospf_terminate) removed, now in ospfd.c. * ospf_vty.c: (show_ip_ospf_area) print out state of stub-router, if active. (show_ip_ospf) print out configuration of stub-router support, and details of graceful-shutdown if the timer is active. ((no)?ospf_max_metric_router_lsa_{admin,startup,shutdown}) new commands to (de-)?configure stub-router support. (config_write_stub_router) write out config of stub-router. (ospf_config_write) call previous. (ospf_vty_init) install the new stub-router commands. * ospfd.c: various functions made static. (ospf_new) Set defaults for stub-router. Graceful shutdown is made to default on, just to be adventerous. (ospf_graceful_shutdown_finish) new function, final part of shutdown. (ospf_graceful_shutdown_timer) timer thread wrapper for graceful-shutdown. (ospf_graceful_shutdown_check) check whether to setup timer for shutdown or proceed directly to final shutdown. (ospf_terminate) moved here from ospf_route.c, call ospf_finish for each instance. (ospf_finish) renamed to ospf_finish_final and made static. (ospf_finish) new function, exported wrapper around ospf_graceful_shutdown_check. (ospf_finish_final) complete shutdown of an instance. Add missing TIMER_OFF's of two timer threads. (ospf_area_free) opaque self lsa timer should be turned off.
2005-09-292005-09-29 Paul Jakma <paul.jakma@sun.com>paul
* configure.ac: Add the test for Solaris least-privileges. Set defines for whether capabilities are supported and whether of the linux or solaris variety. Add missing-prototypes, missing-declarations, char-subscripts and cast-qual warnings to default cflags, cause Hasso enjoys warnings, and we really should clean the remaining ones up. (ie isisd..). * (*/*main.c) Update the zebra_capabilities_t arrays in the various daemons to match the changes made in lib/privs.h. * zebra.h: Solaris capabilities requires priv.h to be included. * privs.{c,h}: Add support for Solaris Least-Privileges. privs.h: Reduce some of the abstract capabilities, which do not have rough equivalents on both systems. Rename the net related caps to _NET, as they should have been in first place. (zprivs_terminate) should take the zebra_privs_t as argument so that it can update change pointer. Add an additional privilege state, ZPRIVS_UNKNOWN. * privs.c: (various capability functions) Add Solaris privileges variants. (zprivs_state) Use privs.c specific generic types to represent various capability/privilege related types, so that each can be typedef'd as appropriate on each platform. (zprivs_null_state) static added, to hold the state the null method should report (should be raised by default, and LOWERED if zprivs_terminate has been called) (zprivs_state_null) Report back the zprivs_null_state. (cap_map) Make it able to map abstract capability to multiple system capabilities. (zcaps2sys) Map to abstract capabilities to multiple system privileges/capabilities. (zprivs_init) move capability related init to seperate function, zprivs_caps_init. (zprivs_terminate) ditto, moved to zprivs_caps_terminate. Set the change_state callback to the NULL state, so the user can continue to run and use the callbacks.
2005-05-062005-05-06 Paul Jakma <paul.jakma@sun.com>paul
* (general) extern and static qualifiers added. unspecified arguments in definitions fixed, typically they should be 'void'. function casts added for callbacks. Guards added to headers which lacked them. Proper headers included rather than relying on incomplete definitions. gcc noreturn function attribute where appropriate. * ospf_opaque.c: remove the private definition of ospf_lsa's ospf_lsa_refresh_delay. * ospf_lsa.h: export ospf_lsa_refresh_delay * ospf_packet.c: (ospf_make_md5_digest) make *auth_key const, correct thing to do - removes need for the casts later. * ospf_vty.c: Use vty.h's VTY_GET_INTEGER rather than ospf_vty's home-brewed versions, shuts up several warnings. * ospf_vty.h: remove VTY_GET_UINT32. VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX moved to lib/vty.h. * ospf_zebra.c: (ospf_distribute_list_update_timer) hacky overloading of the THREAD_ARG pointer should at least use uintptr_t.
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-262004-11-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* 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).
2004-11-25Make group to run daemon as configurable. Fixes #2 from Bugzilla #64.hasso
2004-10-13Unbreak compilation with ospfapi disabled. We should seriously think abouthasso
reducing various configure options.
2004-10-12Unbreak ospfclient compilation.hasso
2004-10-11Disable ospfapi init by default.hasso
2004-10-08Compiler warnings fixes round 1.hasso
2004-06-20Removing code which looked at current dir for config file before attemptinghasso
to read system one.
2004-05-10* Make updating redistributions work if prefix list is changed and it'shasso
used in route-map used to filter redistributions. * Move ospf_prefix_list_update() function from ospfd.c to ospf_zebra.c.
2004-03-22Readded SIGTERM handling into sigevent stuff. Fixes bugzilla #85.hasso
2004-03-162004-03-16 David Young <dyoung@pobox.com>gdt
* (many) reference <lib/version.h> rather than "version.h", because version.h is a generated file and not present in the source tree when using objdir builds. (committed by gdt) works fine with normal builds; didn't try objdir
2004-01-192004-01-19 Paul Jakma <paul@dishone.st>paul
* tests/test-sig.c: New file, regression test for sigevents. * lib/Makefile.am: add sigevent.{c,h} * (isis|rip|ripng|ospf|ospf6|bgp)d/\1_main.c: modify for sigevents. * zebra/main.c: ditto.
2003-08-142003-08-14 Paul Jakma <paul@dishone.st>paul
* zebra/main.c: Fixup ZEBRA_{GROUP,USER} defines -> QUAGGA_{USER,GROUP} * bgpd/bgp_main.c: ditto * ospf6d/ospf6_main.c: ditto * ospfd/ospf_main.c: ditto * ripd/rip_main.c: ditto * ripngd/ripng_main.c: ditto * zebra/main.c: ditto
2003-08-122003-08-12 Paul Jakma <paul@dishone.st>paul
2003-08-12 Paul Jakma <paul@dishone.st> * Makefile.am: redhat/zebra.* -> redhat/quagga.* * configure.ac: Bump autoconf prerequisite to 2.53. dist name zebra -> quagga. general Zebra -> Quagga where appropriate (ie not zebra daemon). User and group zebra->quagga. s/ZEBRA\(_VERSION\)/QUAGGA\1/. * bgpd/bgp_main.c: s/ZEBRA\(_VERSION\)/QUAGGA\1/ * lib/command.c: Update banners and s/ZEBRA\(_VERSION\)/QUAGGA\1/ * lib/print_version.c: ditto * lib/version.h: s/ZEBRA\(_VERSION\)/QUAGGA\1/ and bump version. Change ZEBRA_URL. * lib/smux.c: s/ZEBRA\(_VERSION\)/QUAGGA\1/ * lib/vty.h: Change Zebra.conf to Quagga.conf (integrated file) * ospf6d/ospf6{,_main}.c: s/ZEBRA\(_VERSION\)/QUAGGA\1/ * ospfd/ospf_main.c: s/ZEBRA\(_VERSION\)/QUAGGA\1/
2003-08-102003-08-10 amir <amir@datacore.ch>paul
* Add missing 'i' to getopts, short form of --pid_file. see http://bugzilla.quagga.net/show_bug.cgi?id=25
2003-06-152003-06-15 Paul Jakma <paul@dishone.st>paul
* lib/vty.{c,h}: Remove vty layer depending on a 'master' global, pass the thread master in explicitly to vty_init. Sort out some header dependency problems with lib/command.h * zebra/: Move globals to struct zebrad. Update vty_init(). * (.*)/\1_main.c: update call to vty_init().
2003-06-042003-06-04 Paul Jakma <paul@dishone.st>paul
* Merge of zebra privileges
2003-05-25Tiny fixes from 6Wind patch.hasso
2003-04-042003-04-04 Paul Jakma <paul@dishone.st>paul
* Sync to Zebra CVS * Fix lib/thread.h leak * Fix small Opaque LSA leak * Do not configure OSPF interfaces for secondary addresses * vtysh fixes from Hasso * Dave Watson's missing ntohs fix
2003-01-22Matthew Grant <grantma@anathoth.gen.nz>paul
[zebra 17290] [PATCHES] - Fixes for problems in 0.93b portfix patch
2002-12-13Initial revisionpaul