diff mbox series

[ovs-dev,2/2] ovs-macros.at: Correctly delete iptables rule on_exit.

Message ID 20240828163654.274560-2-pvalerio@redhat.com
State Changes Requested
Headers show
Series [ovs-dev,1/2] system-traffic: Do not rely on conn count for externally tracked packets. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation fail test: fail

Commit Message

Paolo Valerio Aug. 28, 2024, 4:36 p.m. UTC
Currently, at every call of IPTABLES_ACCEPT() an iptables rule gets
added. Such rule is supposed to be removed on exit, but the current
syntax for deleting the rule is incorrect, resulting in a leftover
rule after execution.

Fix it by correcting the deletion command.

Fixes: 5e06e7ac99dc ("tests: Refactor the iptables accept rule.")
Signed-off-by: Paolo Valerio <pvalerio@redhat.com>
---
 tests/ovs-macros.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at
index df2835747..4cc8e7bc8 100644
--- a/tests/ovs-macros.at
+++ b/tests/ovs-macros.at
@@ -365,7 +365,7 @@  dnl to reject input traffic from bridges such as br-underlay.
 dnl Add a rule to always accept the traffic.
 m4_define([IPTABLES_ACCEPT],
   [AT_CHECK([iptables -I INPUT 1 -i $1 -j ACCEPT])
-   on_exit 'iptables -D INPUT 1 -i $1'])
+   on_exit 'iptables -D INPUT 1'])
 
 dnl Required to let conntrack start tracking the packets outside ovs
 m4_define([IPTABLES_CT],