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:
@ -472,6 +472,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");
|
||||
|
||||
|
Reference in New Issue
Block a user