static int
trie_match_net4(const struct f_trie *t, ip4_addr px, uint plen)
{
+ log("net4 compare");
if (plen == 0)
return t->zero;
static int
trie_match_net6(const struct f_trie *t, ip6_addr px, uint plen)
{
+ log("net6 compare");
if (plen == 0)
return t->zero;
int
trie_match_net(const struct f_trie *t, const net_addr *n)
{
+ log(L_DEBUG "trie match net - types %i %i", t->ipv4, n->type);
switch (n->type)
{
case NET_IP4:
SKIP_BACK(struct channel, refeed_req,
SKIP_BACK(struct rt_export_request, prefilter, p)
);
-
+ ASSERT_DIE(c->refeeding);
for (struct channel_feeding_request *cfr = c->refeeding; cfr; cfr = cfr->next)
if (!cfr->trie || trie_match_net(cfr->trie, n))
{
SKIP_BACK(struct channel, reload_req,
SKIP_BACK(struct rt_export_request, prefilter, p)
);
+ ASSERT_DIE(c->importing);
for (struct channel_import_request *cir = c->importing; cir; cir = cir->next)
+ {
+ log(L_DEBUG "in for cycle %x %x", cir->trie, cir->trie->root);
if (!cir->trie || trie_match_net(cir->trie, n))
{
log(L_TRACE "Export this one");
return 1;
}
+ }
log(L_TRACE "%N filtered out of import", n);
return 0;
}
int no_trie = 0;
if (cir)
{
- struct channel_import_request* last = c->import_pending;
- while (last)
- {
- if (!last->trie)
- no_trie = 1;
- last = last->next;
- }
- last = cir;
- no_trie = !last->trie;
+ cir->next = c->import_pending;
+ c->import_pending = cir;
}
+
if (c->reload_req.hook)
{
CD(c, "Reload triggered before the previous one has finished");
c->reload_pending = 1;
return;
}
+ struct channel_import_request *last = cir;
+ while (last)
+ {
+ if (!last->trie)
+ no_trie = 1;
+ last = last->next;
+ }
+
c->importing = c->import_pending;
c->import_pending = NULL;
{
struct rt_exporter *re = &tab->exporter.e;
struct rt_export_request *req = hook->h.req;
- log("Hook is %x", hook);
/* stats zeroed by mb_allocz */
switch (req->prefilter.mode)
{
case TE_ADDR_NONE:
case TE_ADDR_TRIE:
case TE_ADDR_HOOK:
- log(L_TRACE "hook - we will feed by fib, not trie?");
FIB_ITERATE_INIT(&hook->feed_fit, &tab->fib);
hook->h.event.hook = rt_feed_by_fib;
break;
{
if (rt_prefilter_net(&c->h.req->prefilter, n->n.addr))
{
+ log("route passed");
if (!rt_prepare_feed(c, n, &block))
{
+ log("inside ifs");
FIB_ITERATE_PUT(fit);
RT_UNLOCK(tab);
rt_process_feed(c, &block);