From ca46d0fc5baa519f7ec0e4e98c9b46fcb4d75364 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 7 Jul 2025 10:34:45 +0200 Subject: [dnbd3] Adapt to new net_split helper --- core/modules/dnbd3/data/opt/openslx/iptables/rules.d/20-dnbd3 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'core/modules') 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 -- cgit v1.2.3-55-g7522