aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorBengt <32734566+bengtfredh@users.noreply.github.com>2022-05-01 12:51:26 +0200
committerGitHub <noreply@github.com>2022-05-01 12:51:26 +0200
commit5c173d07f50ea2bdf13d87dd5a5ed4dce6702ac6 (patch)
tree32a7cecbc3291fd1fd803a948411fa1bf5ff5f3f
parentfix parameter order (diff)
downloadsetup-wireguard-5c173d07f50ea2bdf13d87dd5a5ed4dce6702ac6.tar.gz
setup-wireguard-5c173d07f50ea2bdf13d87dd5a5ed4dce6702ac6.zip
Add ip route for allowed ips
-rw-r--r--action.yml3
1 files changed, 3 insertions, 0 deletions
diff --git a/action.yml b/action.yml
index f8b2982..b51a2ee 100644
--- a/action.yml
+++ b/action.yml
@@ -146,6 +146,9 @@ runs:
fi
sudo ip link set "$ifname" up
+
+ # Add routes for allowed_ips
+ for i in ${allowed_ips//,/ }; do sudo ip route replace "$i" dev "$ifname"; done
}
# systemd-networkd greets me with 'Temporary failure in name