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.Y18
1 files changed, 9 insertions, 9 deletions
diff --git a/proto/static/config.Y b/proto/static/config.Y
index 182721b3..86359f0b 100644
--- a/proto/static/config.Y
+++ b/proto/static/config.Y
@@ -38,25 +38,25 @@ CF_GRAMMAR
CF_ADDTO(proto, static_proto '}')
-static_proto_start: proto_start STATIC {
- this_proto = proto_config_new(&proto_static, $1);
- static_init_config((struct static_config *) this_proto);
- }
- ;
+static_proto_start: proto_start STATIC
+{
+ this_proto = proto_config_new(&proto_static, $1);
+ static_init_config(STATIC_CFG);
+};
static_proto:
static_proto_start proto_name '{'
| static_proto proto_item ';'
+ | static_proto proto_channel ';' { this_proto->net_type = $2->net_type; }
| static_proto CHECK LINK bool ';' { STATIC_CFG->check_link = $4; }
| static_proto IGP TABLE rtable ';' { STATIC_CFG->igp_table = $4; }
| static_proto stat_route stat_route_opt_list ';' { static_route_finish(); }
;
-stat_route0: ROUTE prefix {
+stat_route0: ROUTE net_any {
this_srt = cfg_allocz(sizeof(struct static_route));
add_tail(&STATIC_CFG->other_routes, &this_srt->n);
- this_srt->net = $2.addr;
- this_srt->masklen = $2.len;
+ this_srt->net = $2;
this_srt_last_cmd = &(this_srt->cmds);
}
;
@@ -72,7 +72,7 @@ stat_multipath1:
this_srt_nh->use_bfd = -1; /* undefined */
}
| stat_multipath1 WEIGHT expr {
- this_srt_nh->masklen = $3 - 1; /* really */
+ this_srt_nh->weight = $3 - 1;
if (($3<1) || ($3>256)) cf_error("Weight must be in range 1-256");
}
| stat_multipath1 BFD bool {