summaryrefslogtreecommitdiff
path: root/proto/static/config.Y
diff options
context:
space:
mode:
Diffstat (limited to 'proto/static/config.Y')
-rw-r--r--proto/static/config.Y8
1 files changed, 7 insertions, 1 deletions
diff --git a/proto/static/config.Y b/proto/static/config.Y
index c8862171..215681e8 100644
--- a/proto/static/config.Y
+++ b/proto/static/config.Y
@@ -107,15 +107,21 @@ stat_nexthops:
| stat_nexthops stat_nexthop
;
+stat_mpls:
+ /* empty */
+ | MPLS expr { this_srt->mpls_label = $2; if ($2 >= MPLS_MAX_LABEL) cf_error("MPLS label must be less than 2^20"); }
+ ;
+
stat_route0: ROUTE net_any {
this_srt = cfg_allocz(sizeof(struct static_route));
add_tail(&STATIC_CFG->routes, &this_srt->n);
this_srt->net = $2;
+ this_srt->mpls_label = (uint) -1;
this_srt_cmds = NULL;
this_srt_last_cmd = NULL;
this_srt->mp_next = NULL;
this_snh = NULL;
- }
+ } stat_mpls
;
stat_route: