]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge branch 'master' into HEAD mq-notif
authorMaria Matejka <mq@ucw.cz>
Mon, 18 Mar 2019 11:57:47 +0000 (12:57 +0100)
committerMaria Matejka <mq@ucw.cz>
Mon, 18 Mar 2019 11:57:47 +0000 (12:57 +0100)
1  2 
nest/protocol.h
nest/route.h
nest/rt-show.c
nest/rt-table.c
proto/mrt/mrt.c
sysdep/unix/krt.c

diff --cc nest/protocol.h
Simple merge
diff --cc nest/route.h
Simple merge
diff --cc nest/rt-show.c
Simple merge
diff --cc nest/rt-table.c
index c3e1a2543010b5d86c17e643751bb10e425761a6,0b796228920405e4ca57f77dd19c0763ec4c9acf..5df3605b3ec551848c73746d395f1d356186d60a
@@@ -423,10 -593,10 +593,10 @@@ export_filter_(struct channel *c, rte *
        goto accept;
      }
  
-   rte_make_tmp_attrs(&rt, pool);
+   rte_make_tmp_attrs(&rt, pool, NULL);
  
    v = filter && ((filter == FILTER_REJECT) ||
 -               (f_run(filter, &rt, pool,
 +               (f_run(&(c->out_filter), &rt, pool,
                        (silent ? FF_SILENT : 0)) > F_ACCEPT));
    if (v)
      {
@@@ -1415,26 -1573,27 +1585,27 @@@ rte_update2(struct channel *c, const ne
          /* new is a private copy, i could modify it */
          new->flags |= REF_FILTERED;
        }
-       else
+       else if (filter)
        {
-         rte_make_tmp_attrs(&new, rte_update_pool);
-         if (filter && (filter != FILTER_REJECT))
-           {
-             ea_list *oldea = new->attrs->eattrs;
-             int fr = f_run(&(c->in_filter), &new, rte_update_pool, 0);
-             if (fr > F_ACCEPT)
-               {
-                 stats->imp_updates_filtered++;
-                 rte_trace_in(D_FILTERS, p, new, "filtered out");
+         rta *old_attrs;
+         rte_make_tmp_attrs(&new, rte_update_pool, &old_attrs);
  
-                 if (! c->in_keep_filtered)
-                   goto drop;
 -        int fr = f_run(filter, &new, rte_update_pool, 0);
++        int fr = f_run(&(c->in_filter), &new, rte_update_pool, 0);
+         if (fr > F_ACCEPT)
+         {
+           stats->imp_updates_filtered++;
+           rte_trace_in(D_FILTERS, p, new, "filtered out");
  
-                 new->flags |= REF_FILTERED;
-               }
-             if (new->attrs->eattrs != oldea && src->proto->store_tmp_attrs)
-               src->proto->store_tmp_attrs(new);
+           if (! c->in_keep_filtered)
+           {
+             rta_free(old_attrs);
+             goto drop;
            }
+           new->flags |= REF_FILTERED;
+         }
+         rte_store_tmp_attrs(new, rte_update_pool, old_attrs);
        }
        if (!rta_is_cached(new->attrs)) /* Need to copy attributes */
        new->attrs = rta_lookup(new->attrs);
@@@ -1531,8 -1690,8 +1702,8 @@@ rt_examine(rtable *t, net_addr *a, stru
    int v = p->preexport ? p->preexport(p, &rt, rte_update_pool) : 0;
    if (v == RIC_PROCESS)
    {
-     rte_make_tmp_attrs(&rt, rte_update_pool);
+     rte_make_tmp_attrs(&rt, rte_update_pool, NULL);
 -    v = (f_run(filter, &rt, rte_update_pool, FF_SILENT) <= F_ACCEPT);
 +    v = (f_run(filter_slot, &rt, rte_update_pool, FF_SILENT | FF_TEMP) <= F_ACCEPT);
    }
  
    /* Discard temporary rte */
diff --cc proto/mrt/mrt.c
index 5769a44bff62e1f7f7e54904237a05110afa4ece,e4f1acea28c9c3eb04060ace170d1ece3617ba2c..db6d5c2d4baebe24ab3cbe295ac8aa2e4e90a8d2
@@@ -496,10 -496,9 +496,10 @@@ mrt_rib_table_dump(struct mrt_table_dum
        continue;
      }
  
-     rte_make_tmp_attrs(&rt, s->linpool);
+     rte_make_tmp_attrs(&rt, s->linpool, NULL);
  
 -    if (f_run(s->filter, &rt, s->linpool, 0) <= F_ACCEPT)
 +    struct filter_slot fs = { .filter = s->filter };
 +    if (f_run(&(fs), &rt, s->linpool, FF_TEMP) <= F_ACCEPT)
        mrt_rib_table_entry(s, rt);
  
      if (rt != rt0)
Simple merge