diff --git a/scripts/build/Dockerfile.alpine b/scripts/build/Dockerfile.alpine index 593e1903159..2c58c910e7a 100644 --- a/scripts/build/Dockerfile.alpine +++ b/scripts/build/Dockerfile.alpine @@ -33,6 +33,7 @@ RUN make mrproper && date && make -j $(nproc) CC="$CC" && date RUN apk add \ ip6tables \ iptables \ + iptables-legacy \ nftables \ iproute2 \ tar \ diff --git a/test/zdtm/static/socket-tcp-nfconntrack.desc b/test/zdtm/static/socket-tcp-nfconntrack.desc index add2513f819..8375cd26ed2 100644 --- a/test/zdtm/static/socket-tcp-nfconntrack.desc +++ b/test/zdtm/static/socket-tcp-nfconntrack.desc @@ -1 +1,6 @@ -{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'suid'} +{ + 'deps': ['/bin/sh', '/sbin/ip|/bin/ip', '/sbin/iptables-legacy|/usr/sbin/iptables-legacy'], + 'flavor': 'h', + 'opts': '--tcp-established', + 'flags': 'suid' +} diff --git a/test/zdtm/static/socket-tcp.c b/test/zdtm/static/socket-tcp.c index f6ef473853d..0df0a2794df 100644 --- a/test/zdtm/static/socket-tcp.c +++ b/test/zdtm/static/socket-tcp.c @@ -74,9 +74,9 @@ int main(int argc, char **argv) } if (system("ip link set up dev lo")) return 1; - if (system("iptables -w -A INPUT -i lo -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT")) + if (system("iptables-legacy -w -A INPUT -i lo -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT")) return 1; - if (system("iptables -w -A INPUT -j DROP")) + if (system("iptables-legacy -w -A INPUT -j DROP")) return 1; #endif