Commit c259669f authored by Ondrej Zajicek (work)'s avatar Ondrej Zajicek (work)
Browse files

Merge branch 'master' into int-new

parents 82f42ea0 da65a3d8
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -14,6 +14,13 @@ Version 2.0.0-pre0 (2016-12-07)
  doc/bird.conf.example2 for configuration examples.


Version 1.6.3 (2016-12-21)
  o Large BGP communities
  o BFD authentication (MD5, SHA1)
  o SHA1 and SHA2 authentication for RIP and OSPF
  o Improved documentation
  o Several bug fixes

Version 1.6.2 (2016-09-29)
  o Fixes serious bug introduced in the previous version

+1 −0
Original line number Diff line number Diff line
@@ -1579,6 +1579,7 @@ i_same(struct f_inst *f1, struct f_inst *f2)
  case P('<','='): TWOARGS; break;

  case '!': ONEARG; break;
  case P('!', '~'):
  case '~': TWOARGS; break;
  case P('d','e'): ONEARG; break;

+6 −0
Original line number Diff line number Diff line
@@ -25,6 +25,12 @@
    (v).data = mb_allocz(pool, HASH_SIZE(v) * sizeof(* (v).data));	\
  })

#define HASH_FREE(v)							\
  ({									\
    mb_free((v).data);							\
    (v) = (typeof(v)){ };						\
  })

#define HASH_FIND(v,id,key...)						\
  ({									\
    u32 _h = HASH_FN(v, id, key);					\
+21 −2
Original line number Diff line number Diff line
@@ -233,6 +233,26 @@ lc_set_contains(struct adata *list, lcomm val)
  return 0;
}

struct adata *
int_set_prepend(struct linpool *pool, struct adata *list, u32 val)
{
  struct adata *res;
  int len;

  if (int_set_contains(list, val))
    return list;

  len = list ? list->length : 0;
  res = lp_alloc(pool, sizeof(struct adata) + len + 4);
  res->length = len + 4;

  if (list)
    memcpy(res->data + 4, list->data, list->length);

  * (u32 *) res->data = val;

  return res;
}

struct adata *
int_set_add(struct linpool *pool, struct adata *list, u32 val)
@@ -250,8 +270,7 @@ int_set_add(struct linpool *pool, struct adata *list, u32 val)
  if (list)
    memcpy(res->data, list->data, list->length);

  u32 *c = (u32 *) (res->data + len);
  *c = val;
  * (u32 *) (res->data + len) = val;

  return res;
}
+1 −0
Original line number Diff line number Diff line
@@ -181,6 +181,7 @@ int lc_set_format(struct adata *set, int from, byte *buf, uint size);
int int_set_contains(struct adata *list, u32 val);
int ec_set_contains(struct adata *list, u64 val);
int lc_set_contains(struct adata *list, lcomm val);
struct adata *int_set_prepend(struct linpool *pool, struct adata *list, u32 val);
struct adata *int_set_add(struct linpool *pool, struct adata *list, u32 val);
struct adata *ec_set_add(struct linpool *pool, struct adata *list, u64 val);
struct adata *lc_set_add(struct linpool *pool, struct adata *list, lcomm val);
Loading