summaryrefslogtreecommitdiff
path: root/isisd/isis_main.c
diff options
context:
space:
mode:
authorJosh Bailey <joshb@google.com>2012-03-24 08:35:20 -0700
committerAvneesh Sachdev <avneesh@opensourcerouting.org>2012-04-07 13:54:37 -0700
commit3f045a08812525505e165deea99a79447b44506b (patch)
treea5c944b0584e0e5a14908a2ac9476637e7c1d7e6 /isisd/isis_main.c
parent6902c69aa30a73ecd70ef8941518b541ca02b878 (diff)
isisd: add Google's changes to IS-IS
Diffstat (limited to 'isisd/isis_main.c')
-rw-r--r--isisd/isis_main.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/isisd/isis_main.c b/isisd/isis_main.c
index c5e824c1..7bb84d8f 100644
--- a/isisd/isis_main.c
+++ b/isisd/isis_main.c
@@ -43,6 +43,9 @@
#include "isisd/isis_circuit.h"
#include "isisd/isisd.h"
#include "isisd/isis_dynhn.h"
+#include "isisd/isis_spf.h"
+#include "isisd/isis_route.h"
+#include "isisd/isis_zebra.h"
/* Default configuration file name */
#define ISISD_DEFAULT_CONFIG "isisd.conf"
@@ -66,7 +69,7 @@ struct zebra_privs_t isisd_privs = {
.vty_group = VTY_GROUP,
#endif
.caps_p = _caps_p,
- .cap_num_p = 2,
+ .cap_num_p = sizeof (_caps_p) / sizeof (*_caps_p),
.cap_num_i = 0
};
@@ -151,7 +154,10 @@ reload ()
zlog_debug ("Reload");
/* FIXME: Clean up func call here */
vty_reset ();
+ (void) isisd_privs.change (ZPRIVS_RAISE);
execve (_progpath, _argv, _envp);
+ zlog_err ("Reload failed: cannot exec %s: %s", _progpath,
+ safe_strerror (errno));
}
static void
@@ -319,28 +325,31 @@ main (int argc, char **argv, char **envp)
memory_init ();
access_list_init();
isis_init ();
- dyn_cache_init ();
+ isis_circuit_init ();
+ isis_spf_cmds_init ();
+
+ /* create the global 'isis' instance */
+ isis_new (1);
+
+ isis_zebra_init ();
+
sort_node ();
/* parse config file */
/* this is needed three times! because we have interfaces before the areas */
vty_read_config (config_file, config_default);
- vty_read_config (config_file, config_default);
- vty_read_config (config_file, config_default);
/* Start execution only if not in dry-run mode */
if (dryrun)
return(0);
/* demonize */
- if (daemon_mode && daemon (0, 0) < 0)
- {
- zlog_err("ISISd daemon failed: %s", strerror(errno));
- exit (1);
- }
+ if (daemon_mode)
+ daemon (0, 0);
/* Process ID file creation. */
- pid_output (pid_file);
+ if (pid_file[0] != '\0')
+ pid_output (pid_file);
/* Make isis vty socket. */
vty_serv_sock (vty_addr, vty_port, ISIS_VTYSH_PATH);