aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/action.yml
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-01-07 19:35:27 +0100
committerGitHub <noreply@github.com>2023-01-07 19:35:27 +0100
commit662ee0ef7a3fe721de4dd02963da2b9fb11441de (patch)
tree32a7cecbc3291fd1fd803a948411fa1bf5ff5f3f /action.yml
parentfix parameter order (diff)
parentAdd ip route for allowed ips (diff)
downloadsetup-wireguard-662ee0ef7a3fe721de4dd02963da2b9fb11441de.tar.gz
setup-wireguard-662ee0ef7a3fe721de4dd02963da2b9fb11441de.zip
Merge pull request #3 from bengtfredh/pr/add-ip-route-allowed-ipsv1.1.0
Add ip route for allowed ips
Diffstat (limited to 'action.yml')
-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