summaryrefslogtreecommitdiff
path: root/sysdep/unix/main.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2014-03-20 14:07:12 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2014-03-20 14:07:12 +0100
commit0c791f873aeb7c1052c97db7da4fe23873d69603 (patch)
tree48496c5965cb6e9f54d7863827c35054c3697c19 /sysdep/unix/main.c
parent4e398e34bf140baf73fe8dceaf81078fb343f65a (diff)
BGP graceful restart support.
Also significant core protocol state changes needed for that, global graceful restart recovery state and kernel proto support for recovery.
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r--sysdep/unix/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index e9217bc9..31094c52 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -602,7 +602,7 @@ signal_init(void)
* Parsing of command-line arguments
*/
-static char *opt_list = "c:dD:ps:P:u:g:f";
+static char *opt_list = "c:dD:ps:P:u:g:fR";
static int parse_and_exit;
char *bird_name;
static char *use_user;
@@ -612,7 +612,7 @@ static int run_in_foreground = 0;
static void
usage(void)
{
- fprintf(stderr, "Usage: %s [-c <config-file>] [-d] [-D <debug-file>] [-p] [-s <control-socket>] [-P <pid-file>] [-u <user>] [-g <group>] [-f]\n", bird_name);
+ fprintf(stderr, "Usage: %s [-c <config-file>] [-d] [-D <debug-file>] [-p] [-s <control-socket>] [-P <pid-file>] [-u <user>] [-g <group>] [-f] [-R]\n", bird_name);
exit(1);
}
@@ -723,6 +723,9 @@ parse_args(int argc, char **argv)
case 'f':
run_in_foreground = 1;
break;
+ case 'R':
+ graceful_restart_recovery();
+ break;
default:
usage();
}
@@ -805,6 +808,8 @@ main(int argc, char **argv)
config_commit(conf, RECONFIG_HARD, 0);
+ graceful_restart_init();
+
#ifdef LOCAL_DEBUG
async_dump_flag = 1;
#endif