mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
MPLS: Handle compatibility with old configs
Old configs do not define MPLS domains and may use a static protocol to define static MPLS routes. When MPLS channel is the only channel of static protocol, handle it as a main channel. Also, define implicit MPLS domain if needed and none is defined.
This commit is contained in:
@@ -99,7 +99,11 @@ mpls_channel_start: MPLS
|
||||
$$ = this_channel = channel_config_get(&channel_mpls, net_label[NET_MPLS], NET_MPLS, this_proto);
|
||||
|
||||
if (EMPTY_LIST(new_config->mpls_domains))
|
||||
cf_error("No MPLS domain defined");
|
||||
{
|
||||
int counter = 0;
|
||||
mpls_domain_config_new(cf_default_name(new_config, "mpls%d", &counter));
|
||||
cf_warn("No MPLS domain defined");
|
||||
}
|
||||
|
||||
/* Default values for new channel */
|
||||
if (!MPLS_CC->domain)
|
||||
|
Reference in New Issue
Block a user