Skip to content

ACL with multiple CIDRs does not honor rule id #12668

@bradh352

Description

@bradh352

problem

If you have a CIDR list like:

rule 1: [ "1.2.3.4/32", "2.3.4.5/32"] tcp allow port 22
rule 65535: [ "0.0.0.0/0"] deny port any

What you end up with when inspecting the VR is:

-A ACL_OUTBOUND_eth12 -d 1.2.3.4/32 -p tcp -m tcp --dport 22 -j ACCEPT
-A ACL_OUTBOUND_eth12 -j DROP
-A ACL_OUTBOUND_eth12 -d 2.3.4.5/32 -p tcp -m tcp --dport 22 -j ACCEPT

This is clearly not the desired behavior.

versions

Cloudstack 4.22.0

The steps to reproduce the bug

See description

What to do about it?

Don't use more than one CIDR per rule

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions