handle missing ip_cidr in rulesets

This commit is contained in:
Andrey Petelin
2025-08-23 20:42:43 +05:00
parent 7484d0c203
commit 6e01e036eb

View File

@@ -1987,7 +1987,7 @@ import_subnets_from_remote_lst_file() {
import_subnets_from_remote_json_file() {
local url="$1"
download_to_stream "$url" | jq -r '.rules[].ip_cidr[]' | while read -r subnet; do
download_to_stream "$url" | jq -r '.rules[].ip_cidr[]?' | while read -r subnet; do
nft_add_podkop_subnet "$subnet"
done
}