diff options
Diffstat (limited to 'proto/wireguard/config.Y')
-rw-r--r-- | proto/wireguard/config.Y | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/proto/wireguard/config.Y b/proto/wireguard/config.Y index 7eee4a65..2eee7e72 100644 --- a/proto/wireguard/config.Y +++ b/proto/wireguard/config.Y @@ -29,11 +29,23 @@ wireguard_proto_start: proto_start WIREGUARD { wireguard_proto: wireguard_proto_start proto_name '{' - | wireguard_proto proto_channel ';' { this_proto->net_type = $2->net_type; } + | wireguard_proto wg_proto_channel ';' | wireguard_proto proto_item ';' | wireguard_proto INTERFACE TEXT ';' { WG_CFG->ifname = $3; } ; +wg_proto_channel: wg_channel_start channel_opt_list wg_channel_end; + +wg_channel_start: net_type +{ + this_channel = channel_config_get(&channel_wg, net_label[$1], $1, this_proto); +} + +wg_channel_end: +{ + this_channel = NULL; +} + CF_CODE CF_END |