]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge branch 'master' into mrtdump
authorPavel Tvrdik <pawel.tvrdik@gmail.com>
Mon, 2 May 2016 12:00:21 +0000 (14:00 +0200)
committerPavel Tvrdik <pawel.tvrdik@gmail.com>
Mon, 2 May 2016 13:49:23 +0000 (15:49 +0200)
15 files changed:
1  2 
conf/conf.c
conf/conf.h
doc/bird.sgml
lib/birdlib.h
lib/ip.c
lib/lists.c
lib/lists.h
nest/config.Y
nest/route.h
nest/rt-fib.c
nest/rt-table.c
proto/bgp/bgp.c
proto/bgp/packets.c
sysdep/unix/io.c
sysdep/unix/log.c

diff --cc conf/conf.c
index 02494d810dddc5ccfa73b20ea7bd88bc8350228c,825a8e9f161e3861e7e15d016ef5e914237131c4..3bae7feaec2028e64eaffeff4a5b1274eba5113b
@@@ -92,10 -91,15 +92,15 @@@ config_alloc(byte *name
    linpool *l = lp_new(p, 4080);
    struct config *c = lp_allocz(l, sizeof(struct config));
  
 -  c->mrtdump_file = -1; /* Hack, this should be sysdep-specific */
+   /* Duplication of name string in local linear pool */
+   uint nlen = strlen(name) + 1;
+   char *ndup = lp_allocu(l, nlen);
+   memcpy(ndup, name, nlen);
 +  c->mrt_proto_file = -1;             /* Indication that the file descriptor should not be used */
    c->pool = p;
-   cfg_mem = c->mem = l;
-   c->file_name = cfg_strdup(name);
+   c->mem = l;
+   c->file_name = ndup;
    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};
diff --cc conf/conf.h
Simple merge
diff --cc doc/bird.sgml
Simple merge
diff --cc lib/birdlib.h
Simple merge
diff --cc lib/ip.c
Simple merge
diff --cc lib/lists.c
Simple merge
diff --cc lib/lists.h
Simple merge
diff --cc nest/config.Y
Simple merge
diff --cc nest/route.h
index 9ea9563377c518b030a0a57fe853b09076f77090,9368808fb5d48ff9dc8e039e0ea7d3a68729bbec..04f647a6ea42f33df352f3eafd609b5b3dbc3fc5
@@@ -70,11 -70,13 +70,13 @@@ void *fib_get(struct fib *, ip_addr *, 
  void *fib_route(struct fib *, ip_addr, int);  /* Longest-match routing lookup */
  void fib_delete(struct fib *, void *);        /* Remove fib entry */
  void fib_free(struct fib *);          /* Destroy the fib */
 -void fib_check(struct fib *);         /* Consistency check for debugging */
 +void fib_check(const struct fib *);   /* Consistency check for debugging */
  
 -void fit_init(struct fib_iterator *, struct fib *); /* Internal functions, don't call */
 -struct fib_node *fit_get(struct fib *, struct fib_iterator *);
 +void fit_init(struct fib_iterator *, const struct fib *); /* Internal functions, don't call */
 +struct fib_node *fit_get(const struct fib *, struct fib_iterator *);
  void fit_put(struct fib_iterator *, struct fib_node *);
+ void fit_put_next(struct fib *f, struct fib_iterator *i, struct fib_node *n, uint hpos);
  
  #define FIB_WALK(fib, z) do {                                 \
        struct fib_node *z, **ff = (fib)->hash_table;           \
diff --cc nest/rt-fib.c
Simple merge
diff --cc nest/rt-table.c
index 9550dd3f4b8d293cb9acfa72535b30a63163b9fd,57c8b8e08a7d8cdc17335c7ce26be3c4eadc7858..696a3d6d5d0c6f9bd534402044dc68fe34c110d9
@@@ -1882,7 -1862,7 +1876,8 @@@ rt_unlock_table(rtable *r
      {
        struct config *conf = r->deleted;
        DBG("Deleting routing table %s\n", r->name);
 +
+       r->config->table = NULL;
        if (r->hostcache)
        rt_free_hostcache(r);
        rem_node(&r->n);
@@@ -1916,10 -1896,9 +1911,10 @@@ rt_commit(struct config *new, struct co
        WALK_LIST(o, old->tables)
        {
          rtable *ot = o->table;
 +        mrt_table_dump_stop_periodic(ot);
          if (!ot->deleted)
            {
-             struct symbol *sym = cf_find_symbol(o->name);
+             struct symbol *sym = cf_find_symbol(new, o->name);
              if (sym && sym->class == SYM_TABLE && !new->shutdown)
                {
                  DBG("\t%s: same\n", o->name);
diff --cc proto/bgp/bgp.c
Simple merge
Simple merge
Simple merge
Simple merge