]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
fixup! fixup! rt-feed-by-fib: addr to trie
authorkaterina.kubecova <katerina.kubecova@nic.cz>
Mon, 2 Oct 2023 10:05:06 +0000 (12:05 +0200)
committerkaterina.kubecova <katerina.kubecova@nic.cz>
Mon, 2 Oct 2023 10:05:06 +0000 (12:05 +0200)
nest/proto.c
nest/rt-table.c

index fa4ada7c1d57e34a198af1df10446bdcdbff82c4..e96a5962c0200cb4088839ac1f94d5418a4122fb 100644 (file)
@@ -318,14 +318,11 @@ channel_roa_out_changed(struct settle *se)
     {
     log_msg(L_DEBUG "trie walk %N", &net);
 
-
       pos++;
       pxc++;
     }
     TRIE_WALK_END;
-    
-  /* TODO: use the information about what roa has changed */
-  
+
   struct f_trie_node4 n4  = (struct f_trie_node4) s->trie->root.v4;
   log_msg(L_DEBUG "channel changed %i", n4.accept);
   c->refeed_pending = 1;
@@ -339,12 +336,12 @@ channel_export_one_roa(struct rt_export_request *req, const net_addr *net, struc
   net_addr* copy = lp_alloc(s->linpool, sizeof(net_addr));
   net_copy(copy, net);
   struct f_trie * trie = f_new_trie(s->linpool, 0);
-  if (net->type == NET_IP4 || net->type == NET_VPN4 || net->type == NET_ROA4){
+  if ( net->type == NET_IP4 || net->type == NET_VPN4 || net->type == NET_ROA4 ){
     trie_add_prefix(trie, net, net_pxlen(net), 48);
   }
   else trie_add_prefix(trie, net, net_pxlen(net), 128);
   s->trie = trie;
+
   settle_kick(&s->settle, s->c->proto->loop);
 
   rpe_mark_seen_all(req->hook, first, NULL, NULL);
index e6c9407232de31c454a3fedac0bf18a9a7c0ee0e..6815fa0125a37a850d6a871d5bde21f28499d56f 100644 (file)
@@ -4345,7 +4345,7 @@ rt_feed_by_fib(void *data)
 
   FIB_ITERATE_START(&tab->fib, fit, net, n)
     {
-      if ((c->h.req->prefilter.addr_mode == TE_ADDR_NONE) || trie_match_net( c->h.req->prefilter.net_filter_trie,  n->n.addr)  )/*net_in_netX(n->n.addr, c->h.req->addr))    net n     trie_match_net(const struct f_trie *t, const net_addr *n)*/
+      if ( (c->h.req->prefilter.addr_mode == TE_ADDR_NONE) || trie_match_net( c->h.req->prefilter.net_filter_trie,  n->n.addr)  )
       {
        if (!rt_prepare_feed(c, n, &block))
        {