summaryrefslogtreecommitdiffstats
path: root/core/modules/dnbd3/data/opt
diff options
context:
space:
mode:
authorSimon Rettberg2025-07-07 10:34:45 +0200
committerSimon Rettberg2025-07-07 10:34:45 +0200
commitca46d0fc5baa519f7ec0e4e98c9b46fcb4d75364 (patch)
tree0b39a820641a851f247e5e1de7b7297bdcbedce4 /core/modules/dnbd3/data/opt
parent[virt-viewer] Add more ugly hacks to get number of windows under control (diff)
downloadmltk-ca46d0fc5baa519f7ec0e4e98c9b46fcb4d75364.tar.gz
mltk-ca46d0fc5baa519f7ec0e4e98c9b46fcb4d75364.tar.xz
mltk-ca46d0fc5baa519f7ec0e4e98c9b46fcb4d75364.zip
[dnbd3] Adapt to new net_split helper
Diffstat (limited to 'core/modules/dnbd3/data/opt')
-rwxr-xr-xcore/modules/dnbd3/data/opt/openslx/iptables/rules.d/20-dnbd37
1 files changed, 2 insertions, 5 deletions
diff --git a/core/modules/dnbd3/data/opt/openslx/iptables/rules.d/20-dnbd3 b/core/modules/dnbd3/data/opt/openslx/iptables/rules.d/20-dnbd3
index aab30e2d..44f1ff0a 100755
--- a/core/modules/dnbd3/data/opt/openslx/iptables/rules.d/20-dnbd3
+++ b/core/modules/dnbd3/data/opt/openslx/iptables/rules.d/20-dnbd3
@@ -5,13 +5,10 @@
[ -z "${SLX_DNBD3_SERVERS}${SLX_DNBD3_FALLBACK}" ] && exit 0
. /opt/openslx/bin/slx-tools
-net_split &> /dev/null # Preload, as it's being used in subshell
for ip in $SLX_DNBD3_SERVERS $SLX_DNBD3_FALLBACK; do
- ip=$( net_split "$ip" 5003 )
- port=${ip#* }
- ip=${ip% *}
- iptables -A OUTPUT -d "$ip" -p tcp --dport "$port" -j ACCEPT
+ net_split "$ip" 5003 || continue
+ iptables -A OUTPUT -d "$nethost" -p tcp --dport "$netport" -j ACCEPT
done
exit 0