]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
wireguard: Route the client pool
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 25 Apr 2024 16:47:49 +0000 (18:47 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 22 Apr 2025 14:48:31 +0000 (16:48 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/system/wireguard

index baf829248112c26e29130dad759da6cf3ee4579f..95dcfa23ab339769910b619a5e47ef762920f1a3 100644 (file)
@@ -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