Skip to content

Commit

Permalink
test/nfconntrack: use iptables-legacy
Browse files Browse the repository at this point in the history
Signed-off-by: Radostin Stoyanov <[email protected]>
  • Loading branch information
rst0git committed Jan 5, 2024
1 parent a357fbb commit 9eacd6e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions scripts/build/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ RUN make mrproper && date && make -j $(nproc) CC="$CC" && date
RUN apk add \
ip6tables \
iptables \
iptables-legacy \
nftables \
iproute2 \
tar \
Expand Down
7 changes: 6 additions & 1 deletion test/zdtm/static/socket-tcp-nfconntrack.desc
Original file line number Diff line number Diff line change
@@ -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'
}
4 changes: 2 additions & 2 deletions test/zdtm/static/socket-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9eacd6e

Please sign in to comment.