diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2019-03-26 00:25:14 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-05-08 18:52:55 +0200 |
commit | 0d19c1ba2e0bd23680c0c7fb3b734d9afe2df3b8 (patch) | |
tree | 632c566c37ed1a4d03fa9da5384ba9abdfde2111 /proto/wireguard/config.Y | |
parent | f72a2873b0616cf232ec312da2629058bc3710ca (diff) |
Wireguard: Allow multiple channels
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 |