Skip to content

Commit 02a7383

Browse files
CopilotKaniska244
andauthored
fix: also verify iptables-nft works before switching to it
Agent-Logs-Url: https://github.com/devcontainers/features/sessions/af4f00a5-8bfc-472b-97e3-735ddf7a07c1 Co-authored-by: Kaniska244 <186041440+Kaniska244@users.noreply.github.com>
1 parent 38eb552 commit 02a7383

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/docker-in-docker/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ if [ "${ADJUSTED_ID}" = "debian" ]; then
315315
if type iptables-legacy > /dev/null 2>&1 && iptables-legacy -nL > /dev/null 2>&1; then
316316
update-alternatives --set iptables /usr/sbin/iptables-legacy
317317
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
318-
elif type iptables-nft > /dev/null 2>&1; then
318+
elif type iptables-nft > /dev/null 2>&1 && iptables-nft -nL > /dev/null 2>&1; then
319319
update-alternatives --set iptables /usr/sbin/iptables-nft
320320
update-alternatives --set ip6tables /usr/sbin/ip6tables-nft
321321
fi

0 commit comments

Comments
 (0)