Skip to content

Commit 72e1b1e

Browse files
paudleyCopilot
andcommitted
Update scripts/network_guard.sh
Co-authored-by: Copilot <[email protected]> Signed-off-by: Patrick Audley <[email protected]>
1 parent d0a76fd commit 72e1b1e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/network_guard.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ while true; do
132132
fi
133133
if [[ "${has_ip6tables}" == true ]]; then
134134
if create_chain ip6tables "${CHAIN_V6}" 2>/dev/null; then
135-
add_network_rules ip6tables "${CHAIN_V6}" "${ipv6[@]}"
135+
if [[ ${#ipv6[@]} -gt 0 ]]; then
136+
add_network_rules ip6tables "${CHAIN_V6}" "${ipv6[@]}"
137+
fi
136138
if [[ ${#ports[@]} -gt 0 ]]; then
137139
remove_existing_rules ip6tables "${CHAIN_V6}" "${ports[@]}" || true
138140
insert_rules ip6tables "${CHAIN_V6}" "${ports[@]}"

0 commit comments

Comments
 (0)