From: Michael Tremer Date: Thu, 25 Apr 2024 16:47:49 +0000 (+0200) Subject: wireguard: Route the client pool X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5eb7d41133f3b8a74f38f3b2ab01ccb8c34ae0f1;p=ipfire-2.x.git wireguard: Route the client pool Signed-off-by: Michael Tremer --- diff --git a/src/initscripts/system/wireguard b/src/initscripts/system/wireguard index baf829248..95dcfa23a 100644 --- a/src/initscripts/system/wireguard +++ b/src/initscripts/system/wireguard @@ -56,6 +56,11 @@ generate_config() { # Flush all previously set routes ip route flush dev "${INTF}" + # Add the client pool + if [ -n "${CLIENT_POOL}" ]; then + ip route add "${CLIENT_POOL}" dev "${INTF}" + fi + while read -r id enabled type name pubkey endpoint port routes \ remarks local_subnets psk keepalive _rest; do # Skip peers that are not enabled