]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge remote-tracking branch 'origin/master' into backport
authorMaria Matejka <mq@ucw.cz>
Mon, 11 Jul 2022 09:08:10 +0000 (11:08 +0200)
committerMaria Matejka <mq@ucw.cz>
Mon, 11 Jul 2022 09:08:10 +0000 (11:08 +0200)
12 files changed:
1  2 
conf/conf.h
doc/bird.sgml
filter/config.Y
filter/data.h
filter/decl.m4
filter/f-inst.c
filter/filter.c
filter/test.conf
nest/a-path.c
nest/a-path_test.c
nest/config.Y
sysdep/unix/main.c

diff --cc conf/conf.h
Simple merge
diff --cc doc/bird.sgml
Simple merge
diff --cc filter/config.Y
Simple merge
diff --cc filter/data.h
Simple merge
diff --cc filter/decl.m4
Simple merge
diff --cc filter/f-inst.c
index 2c4c97b146f6f282bb4f37b076a235f537a42dc8,30db96f28e269bb584e8b5767b27f33a869e6d1c..0fb04ba797b4a29b5dbbd577d765b2aeb2c9bdb8
  
      /* Push the body on stack */
      LINEX(sym->function);
+     curline.vbase = curline.ventry;
      curline.emask |= FE_RETURN;
  
-     /* Before this instruction was called, there was the T_VOID
-      * automatic return value pushed on value stack and also
-      * sym->function->args function arguments. Setting the
-      * vbase to point to first argument. */
-     ASSERT(curline.ventry >= sym->function->args);
-     curline.ventry -= sym->function->args;
-     curline.vbase = curline.ventry;
+     /* Arguments on stack */
+     fstk->vcnt += sym->function->args;
  
      /* Storage for local variables */
 +    f_vcnt_check_overflow(sym->function->vars);
      memset(&(fstk->vstk[fstk->vcnt]), 0, sizeof(struct f_val) * sym->function->vars);
      fstk->vcnt += sym->function->vars;
    }
diff --cc filter/filter.c
Simple merge
Simple merge
diff --cc nest/a-path.c
index badbc91152f5966d84119652d2670509080abb53,6bb1828592ffba165d76098c72c03ca2f34e9d07..c421b41f71519ea2472aab67afd16a78fce1e2e3
@@@ -629,13 -631,13 +631,13 @@@ as_path_filter(struct linpool *pool, co
          u32 as = get_as(p);
          int match;
  
-         if (set)
+         if (set->type == T_SET)
            {
 -            struct f_val v = {T_INT, .val.i = as};
 +            struct f_val v = { .type = T_INT, .val.i = as};
-             match = !!find_tree(set, &v);
+             match = !!find_tree(set->val.t, &v);
            }
-         else
-           match = (as == key);
+         else /* T_INT */
+           match = (as == set->val.i);
  
          if (match == pos)
            {
index e007a45040f47c55ff954cbc60d720bce718c1ac,97924c006eb6b33b3b3598101b1d4c545e7263e0..a0f3f0e3363dbf7c1be2ee3d6ded7a6a99d3d827
@@@ -127,8 -137,9 +128,9 @@@ t_path_include(void
      int counts_of_contains = count_asn_in_array(as_nums, as_nums[i]);
      bt_assert_msg(as_path_contains(as_path, as_nums[i], counts_of_contains), "AS Path should contains %d-times number %d", counts_of_contains, as_nums[i]);
  
-     bt_assert(as_path_filter(tmp_linpool, as_path, NULL, as_nums[i], 0) != NULL);
-     bt_assert(as_path_filter(tmp_linpool, as_path, NULL, as_nums[i], 1) != NULL);
+     struct f_val v = { .type = T_INT, .val.i = as_nums[i] };
 -    bt_assert(as_path_filter(lp, as_path, &v, 0) != NULL);
 -    bt_assert(as_path_filter(lp, as_path, &v, 1) != NULL);
++    bt_assert(as_path_filter(tmp_linpool, as_path, &v, 0) != NULL);
++    bt_assert(as_path_filter(tmp_linpool, as_path, &v, 1) != NULL);
    }
  
    for (i = 0; i < 10000; i++)
diff --cc nest/config.Y
Simple merge
Simple merge