Skip to content

Commit

Permalink
tests: Fix L2 ACL test.
Browse files Browse the repository at this point in the history
The ACLs configured by the "ovn -- L2 Drop and Allow ACL w/ Stateful
ACL" test were incorrect because they didn't enclose logical port names
in quotes.  This caused stateful ACLs to never be applied so the L2
drop rules were not properly tested.

ovn-controller was logging the following errors:
lflow|WARN|error parsing match "reg0[8] == 1 && (inport == lp31 && ip)": Syntax error at `lp31' expecting constant.
lflow|WARN|error parsing match "reg0[8] == 1 && (inport == lp31 && ip)": Syntax error at `lp31' expecting constant.
lflow|WARN|error parsing match "reg0[8] == 1 && (inport == lp31 && ip)": Syntax error at `lp31' expecting constant.

Fixes: 63640c0 ("ovn-northd: ls_*_acl behavior not consistent for untracked flows")
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>

(cherry-picked from master commit a5ac78e)
  • Loading branch information
dceara authored and numansiddique committed Jan 25, 2021
1 parent b15ae26 commit daeaa2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ovn.at
Expand Up @@ -14038,7 +14038,7 @@ for sf in 0 1; do
if test ${sf} = 1; then
# Add a stateful rule and re-run the check to make sure the
# drop rule is still effective..
ovn-nbctl --wait=hv acl-add lsw0 from-lport 2000 "inport == lp31 && ip" allow-related
ovn-nbctl --wait=hv acl-add lsw0 from-lport 2000 'inport == "lp31" && ip' allow-related
fi
for is in 1 2 3; do
s=${is}1
Expand Down Expand Up @@ -14077,7 +14077,7 @@ for sf in 0 1; do
if test ${sf} = 1; then
# Add a stateful rule and re-run the check to make sure the
# allow rule is still effective..
check ovn-nbctl --wait=hv acl-add lsw0 from-lport 2000 "inport == lp31 && ip" allow-related
check ovn-nbctl --wait=hv acl-add lsw0 from-lport 2000 'inport == "lp31" && ip' allow-related
fi
# dump information and flows with counters
ovn-sbctl dump-flows -- list multicast_group > sbflows$sf
Expand Down

0 comments on commit daeaa2b

Please sign in to comment.