aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHristo Venev <hristo@venev.name>2020-02-04 23:53:28 +0100
committerHristo Venev <hristo@venev.name>2020-02-04 23:53:28 +0100
commit60092ddadb2a03f6ef13a116ab2a2b5ebe99bd1d (patch)
tree651af18341694568d4e633b1fd56045b844e732b
parentca4eddd56712a5b7984395601b63dd79e7a8abd6 (diff)
Add the new options to the netifd script.
-rwxr-xr-xdist/netifd/wgconfd.sh9
1 files changed, 9 insertions, 0 deletions
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"
}