From 60092ddadb2a03f6ef13a116ab2a2b5ebe99bd1d Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Tue, 4 Feb 2020 23:53:28 +0100 Subject: Add the new options to the netifd script. --- dist/netifd/wgconfd.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dist/netifd') diff --git a/dist/netifd/wgconfd.sh b/dist/netifd/wgconfd.sh index 1fa6aba..af34525 100755 --- a/dist/netifd/wgconfd.sh +++ b/dist/netifd/wgconfd.sh @@ -63,6 +63,9 @@ proto_wgconfd_setup__source() { config_get_bool val "$1" required 0 [ "$val" -eq 1 ] && proto_wgconfd_setup__print required + config_get_bool val "$1" allow_road_warriors 1 + [ "$val" -eq 0 ] && proto_wgconfd_setup__print deny_road_warriors + config_list_foreach "$1" ipv4 proto_wgconfd_setup__source_route ipv4 32 config_list_foreach "$1" ipv6 proto_wgconfd_setup__source_route ipv6 128 @@ -107,9 +110,15 @@ proto_wgconfd_setup__peer() { [ -z "$val" ] && return proto_wgconfd_setup__print public_key "$val" + config_get val "$1" endpoint + [ -n "$val" ] && proto_wgconfd_setup__print endpoint "$val" + config_get val "$1" psk [ -n "$val" ] && proto_wgconfd_setup__print psk "$val" + config_get val "$1" keepalive + [ -n "$val" ] && proto_wgconfd_setup__print keepalive "$val" + config_get val "$1" source [ -n "$val" ] && proto_wgconfd_setup__print source "$val" } -- cgit