mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-08 12:18:42 +00:00
Merge commit 'v2.13.1-183-g2b05844c' into thread-next
This commit is contained in:
commit
8d2ec536d9
@ -101,7 +101,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)
|
||||
|
@ -678,7 +678,7 @@ struct channel_config *proto_cf_find_channel(struct proto_config *p, uint net_ty
|
||||
static inline struct channel_config *proto_cf_main_channel(struct proto_config *pc)
|
||||
{ return proto_cf_find_channel(pc, pc->net_type); }
|
||||
static inline struct channel_config *proto_cf_mpls_channel(struct proto_config *pc)
|
||||
{ return proto_cf_find_channel(pc, NET_MPLS); }
|
||||
{ return (pc->net_type != NET_MPLS) ? proto_cf_find_channel(pc, NET_MPLS) : NULL; }
|
||||
|
||||
struct channel *proto_find_channel_by_table(struct proto *p, rtable *t);
|
||||
struct channel *proto_find_channel_by_name(struct proto *p, const char *n);
|
||||
|
@ -470,6 +470,10 @@ static_postconfig(struct proto_config *CF)
|
||||
struct static_config *cf = (void *) CF;
|
||||
struct static_route *r;
|
||||
|
||||
/* If there is just a MPLS channel, use it as a main channel */
|
||||
if (!CF->net_type && proto_cf_mpls_channel(CF))
|
||||
CF->net_type = NET_MPLS;
|
||||
|
||||
if (! proto_cf_main_channel(CF))
|
||||
cf_error("Channel not specified");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user