Commit 0c791f87 authored by Ondrej Zajicek's avatar Ondrej Zajicek
Browse files

BGP graceful restart support.

Also significant core protocol state changes needed for that,
global graceful restart recovery state and kernel proto support
for recovery.
parent 4e398e34
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ config_alloc(byte *name)
  c->load_time = now;
  c->tf_route = c->tf_proto = (struct timeformat){"%T", "%F", 20*3600};
  c->tf_base = c->tf_log = (struct timeformat){"%F %T", NULL, 0};
  c->gr_wait = DEFAULT_GR_WAIT;

  return c;
}
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ struct config {
  struct timeformat tf_proto;		/* Time format for 'show protocol' */
  struct timeformat tf_log;		/* Time format for the logfile */
  struct timeformat tf_base;		/* Time format for other purposes */
  u32 gr_wait;				/* Graceful restart wait timeout */

  int cli_debug;			/* Tracing of CLI connections and commands */
  char *err_msg;			/* Parser error message */
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ Reply codes of BIRD command-line interface
0021	Undo requested
0022	Undo scheduled
0023	Evaluation of expression
0024	Graceful restart status report

1000	BIRD version
1001	Interface list
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,8 @@ typedef struct list { /* In fact two overlayed nodes */
#define NODE_NEXT(n) ((void *)((NODE (n))->next))
#define NODE_VALID(n) ((NODE (n))->next)
#define WALK_LIST(n,list) for(n=HEAD(list); NODE_VALID(n); n=NODE_NEXT(n))
#define WALK_LIST2(n,nn,list,pos) \
  for(nn=(list).head; NODE_VALID(nn) && (n=SKIP_BACK(typeof(*n),pos,nn)); nn=nn->next)
#define WALK_LIST_DELSAFE(n,nxt,list) \
     for(n=HEAD(list); nxt=NODE_NEXT(n); n=(void *) nxt)
/* WALK_LIST_FIRST supposes that called code removes each processed node */
+3 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
 */

#include "nest/bird.h"
#include "nest/protocol.h"
#include "nest/route.h"
#include "nest/cli.h"
#include "conf/conf.h"
@@ -32,6 +33,8 @@ cmd_show_status(void)
  tm_format_datetime(tim, &config->tf_base, config->load_time);
  cli_msg(-1011, "Last reconfiguration on %s", tim);

  graceful_restart_show_status();

  if (shutting_down)
    cli_msg(13, "Shutdown in progress");
  else if (configuring)
Loading