Commit 3f6bfbbf authored by Ondrej Zajicek's avatar Ondrej Zajicek
Browse files

Merge commit '538fec7b' into integrated

parents 6a996cb9 538fec7b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
Version 1.4.2 (2014-04-02)
  o Important bugfix in BFD.

Version 1.4.1 (2014-03-31)
  o BGP add-path support (RFC draft).
  o BGP graceful restart (RFC 4724).
  o OSPF: many changes in socket layer.
  o OSPF: support for secondary addresses in BSD.
  o OSPF: names for vlink pseudointerfaces (vlinkX).
  o Several bugfixes.

Version 1.4.0 (2013-11-25)
  o BFD protocol (RFC 5880).
  o BFD support for OSPF and BGP.
+0 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ static int prompt_active;
/* HACK: libreadline internals we need to access */
extern int _rl_vis_botlin;
extern void _rl_move_vert(int);
extern Function *rl_last_func;

static void
add_history_dedup(char *cmd)
+28 −5
Original line number Diff line number Diff line
@@ -265,9 +265,6 @@ cf_hash(byte *c)
 * match - these do not have fd and flex buffer yet).
 *
 * FIXME: Most of these ifs and include functions are really sysdep/unix.
 *
 * FIXME: Resources (fd, flex buffers and glob data) in IFS stack
 * are not freed when cf_error() is called.
 */

static struct include_file_stack *
@@ -306,13 +303,36 @@ enter_ifs(struct include_file_stack *new)
  yy_switch_to_buffer(new->buffer);
}

/**
 * cf_lex_unwind - unwind lexer state during error
 *
 * cf_lex_unwind() frees the internal state on IFS stack when the lexical
 * analyzer is terminated by cf_error().
 */
void
cf_lex_unwind(void)
{
  struct include_file_stack *n;

  for (n = ifs; n != ifs_head; n = n->prev)
    {
      /* Memory is freed automatically */
      if (n->buffer)
	yy_delete_buffer(n->buffer);
      if (n->fd)
        close(n->fd);
    }

  ifs = ifs_head;
}

static void
cf_include(char *arg, int alen)
{
  struct include_file_stack *base_ifs = ifs;
  int new_depth, rv, i;
  char *patt;
  glob_t g;
  glob_t g = {};

  new_depth = ifs->depth + 1;
  if (new_depth > MAX_INCLUDE_DEPTH)
@@ -360,7 +380,10 @@ cf_include(char *arg, int alen)
      struct stat fs;

      if (stat(fname, &fs) < 0)
	{
	  globfree(&g);
	  cf_error("Unable to stat included file %s: %m", fname);
	}

      if (fs.st_mode & S_IFDIR)
        continue;
+1 −0
Original line number Diff line number Diff line
@@ -503,6 +503,7 @@ cf_error(char *msg, ...)
  new_config->err_msg = cfg_strdup(buf);
  new_config->err_lino = ifs->lino;
  new_config->err_file_name = ifs->file_name;
  cf_lex_unwind();
  longjmp(conf_jmpbuf, 1);
}

+2 −0
Original line number Diff line number Diff line
@@ -139,6 +139,8 @@ extern struct include_file_stack *ifs;

int cf_lex(void);
void cf_lex_init(int is_cli, struct config *c);
void cf_lex_unwind(void);

struct symbol *cf_find_symbol(byte *c);
struct symbol *cf_default_name(char *template, int *counter);
struct symbol *cf_define_symbol(struct symbol *symbol, int type, void *def);
Loading