node roa_node;
struct settle settle;
struct channel *c;
+ rtable *tab;
struct rt_export_request req;
struct f_trie *trie;
};
{
struct roa_subscription *s = SKIP_BACK(struct roa_subscription, req, req);
struct channel *c = s->c;
- struct rtable_private *tab = SKIP_BACK(struct rtable_private, exporter.e, req->hook->table);
- debug(" Channel %s.%s ROA %s change notifier from table %s request %p\n",
+ debug(" Channel %s.%s ROA %s change notifier request %p\n",
c->proto->name, c->name,
(s->settle.hook == channel_roa_in_changed) ? "import" : "export",
- tab->name, req);
+ req);
}
static int
node *n;
WALK_LIST2(s, n, c->roa_subscriptions, roa_node)
- if ((tab == SKIP_BACK(rtable, priv.exporter.e, s->req.hook->table))
- && (s->settle.hook == hook))
+ if ((tab == s->tab) && (s->settle.hook == hook))
return 1;
return 0;
.settle = SETTLE_INIT(&c->roa_settle, dir ? channel_roa_in_changed : channel_roa_out_changed, NULL),
.c = c,
.trie = f_new_trie(lp_new(c->proto->pool), 0),
+ .tab = tab,
.req = {
.name = mb_sprintf(c->proto->pool, "%s.%s.roa-%s.%s",
c->proto->name, c->name, dir ? "in" : "out", tab->name),
rfree(s->trie->lp);
rt_stop_export(&s->req, channel_roa_unsubscribed);
settle_cancel(&s->settle);
+ s->settle.hook = NULL;
}
static void