scripts: end the egress check on a missing chain

This commit is contained in:
shum committed 2026-10-22 05:33:49 +00:00
1 parent 0ce76c2302
commit 7c86b313f0
1 file changed
+3 -2
+3 -2
View File
@@ -333,10 +333,11 @@ check_family() {
failed=1
fi
done < <(rules_for "$family")
jumps=$(jumps_for "$tool")
# check runs under ||, where errexit is off, so a failed lookup has to end the check itself
jumps=$(jumps_for "$tool") || return 1
while read -r parent line; do
jump="-A $parent $line -j $CHAIN"
rules=$(chain_rules "$tool" "$parent")
rules=$(chain_rules "$tool" "$parent") || return 1
if [[ ${rules%%$'\n'*} != "$jump" ]]; then
echo "$tool: the first rule of $parent is not $jump" >&2
failed=1