P->main_channel = proto_add_channel(P, proto_cf_main_channel(CF));
- P->neigh_notify = static_neigh_notify;
+ proto_configure_channel(P, &P->mpls_channel, proto_cf_mpls_channel(CF));
+
+ P->iface_sub.neigh_notify = static_neigh_notify;
P->reload_routes = static_reload_routes;
- P->rte_better = static_rte_better;
- P->rte_mergable = static_rte_mergable;
+ P->sources.class = &static_rte_owner_class;
if (cf->igp_table_ip4)
p->igp_table_ip4 = cf->igp_table_ip4->table;
BUFFER_INIT(p->marked, p->p.pool, 4);
- proto_setup_mpls_map(P, RTS_STATIC, 1);
++ proto_setup_mpls_map(P, RTS_STATIC);
+
/* We have to go UP before routes could be installed */
proto_notify_state(P, PS_UP);
struct static_config *cf = (void *) P->cf;
struct static_route *r;
- proto_shutdown_mpls_map(P, 1);
++ proto_shutdown_mpls_map(P);
+
/* Just reset the flag, the routes will be flushed by the nest */
WALK_LIST(r, cf->routes)
static_reset_rte(p, r);
(IGP_TABLE(o, ip6) != IGP_TABLE(n, ip6)))
return 0;
- if (!proto_configure_channel(P, &P->main_channel, proto_cf_main_channel(CF)))
+ if (!proto_configure_channel(P, &P->main_channel, proto_cf_main_channel(CF)) ||
+ !proto_configure_channel(P, &P->mpls_channel, proto_cf_mpls_channel(CF)))
return 0;
- proto_setup_mpls_map(P, RTS_STATIC, 1);
++ proto_setup_mpls_map(P, RTS_STATIC);
+
p->p.cf = CF;
/* Reset route lists in neighbor entries */