aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/network/services/wireguard/files/wireguard.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/package/network/services/wireguard/files/wireguard.sh b/package/network/services/wireguard/files/wireguard.sh
index 96fa7215ff..58e47f9450 100644
--- a/package/network/services/wireguard/files/wireguard.sh
+++ b/package/network/services/wireguard/files/wireguard.sh
@@ -176,12 +176,14 @@ proto_wireguard_setup() {
done
# endpoint dependency
- wg show "${config}" endpoints | \
- sed -E 's/\[?([0-9.:a-f]+)\]?:([0-9]+)/\1 \2/' | \
- while IFS=$'\t ' read -r key address port; do
- [ -n "${port}" ] || continue
- proto_add_host_dependency "${config}" "${address}"
- done
+ if [ ! "${fwmark}" ]; then
+ wg show "${config}" endpoints | \
+ sed -E 's/\[?([0-9.:a-f]+)\]?:([0-9]+)/\1 \2/' | \
+ while IFS=$'\t ' read -r key address port; do
+ [ -n "${port}" ] || continue
+ proto_add_host_dependency "${config}" "${address}"
+ done
+ fi
proto_send_update "${config}"
}