Routed network ACL rules with a protocol number are not applied on the VR (ip nexthdr instead of ip protocol)
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- linux, python
- 领域
- networking
调研方向
从 systemvm/debian/opt/cloud/bin/configure.py 中的 CsAcl.AclDevice.__process_routing_ip4() 开始,这里会生成路由的 IPv4 ACL 规则。将 IPv4 匹配条件与正确的 IPv6 路径进行比较,并按照复现步骤确认生成的规则:添加一条协议 47 的 ACL 规则,然后在 VR 上检查 nft list table ip ip4_acl。当 IPv4 规则使用 ip protocol,并且出现在 ACL 表中且没有记录的 nft 失败时,即为完成。
由索引模型根据 Issue 内容生成。
描述
problem
On a VPC in routed mode (IPv4 routing, introduced in 4.20 with #9470), a network ACL rule that uses a protocol number (e.g. 47 for GRE) is never applied on the VR.
CsAcl.AclDevice.__process_routing_ip4() in systemvm/debian/opt/cloud/bin/configure.py renders it as:
ip saddr 1.2.3.4/32 ip nexthdr 47 accept
nexthdr is an IPv6 header field. The IPv4 equivalent is ip protocol, so nft rejects the rule:
$ nft add rule ip ip4_acl eth3_ingress_policy ip saddr 1.2.3.4/32 ip nexthdr 47 accept
Error: syntax error, unexpected string
add rule ip ip4_acl eth3_ingress_policy ip saddr 1.2.3.4/32 ip nexthdr 47 accept
^^^^^^^
The rules are added one nft add rule at a time and the failure is only logged (/var/log/cloud.log records the non-zero exit status; nft's message goes to stderr), so the rule is silently missing from ip4_acl while the rest of the ACL loads. An allow rule for that protocol therefore never matches. A deny rule for it is also lost, so that traffic falls through to whatever later rule matches it.
The IPv6 path (__process_ip6, ip6 nexthdr) is correct. Non-routed VPCs use iptables and are not affected.
versions
CloudStack 4.20 onward (still present on 4.22).
The steps to reproduce the bug
- Create a VPC in routed mode with an IPv4 tier. (Network ACLs only exist on VPC tiers.)
- Add an ACL rule to the tier's ACL list: protocol number
47, CIDR0.0.0.0/0, action Allow. - On the VR, run
nft list table ip ip4_acl. The rule is missing fromethX_ingress_policy. grep "ip nexthdr" /var/log/cloud.logshows the failednft add rule(returned non-zero exit status 1).
What to do about it?
Render the IPv4 match as ip protocol <n>, which nft accepts (it lists it as ip protocol gre).
- 主要语言
- Java
- 星标
- 3.1k
- 派生
- 1.4k
- 平均合并
- 10 天 13 小时
- 30 天内合并 PR
- 10
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/cloudstack 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
apache/cloudstack#14381 ·
维护者通常 1 天内回复
-
listPublicIpAddresses NullPointerException on shared networks with a VR (4.22)可能已有人在做 @MitchDrage 于 17 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 80/100
apache/cloudstack#14248 ·
维护者通常 1 天内回复
-
CKS: upgradeKubernetesCluster fails on control node when binaries ISO ships headlamp.yaml instead of dashboard.yaml可能已有人在做 @mw-0 于 18 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 68/100
apache/cloudstack#14244 · 1 条评论 ·
维护者通常 1 天内回复
-
Resize volume API validation errors are not displayed in the UI可能已有人在做 @sathvikaragi 于 20 天前认领。 未关闭bug
难度 1/5 1 小时以内 新手友好度 90/100
apache/cloudstack#14222 · 2 条评论 ·
维护者通常 1 天内回复
-
bug component:kubernetes
难度 1/5 1 小时以内 新手友好度 88/100
apache/cloudstack#14180 ·
维护者通常 1 天内回复
查看 apache/cloudstack 的全部 Issue
相似的 Issue
-
needs-area-label
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
quelea-projection/Quelea#711 ·
-
bug pdd
难度 2/5 1 小时以内 新手友好度 67/100
objectionary/eo#9450 ·
维护者通常 1 天内回复
-
[EC2] DescribeAvailabilityZones should return real AWS error for unknown zone name可能已有人在做 @omatheusmesmo 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
area: core good first issue type: enhancement
难度 2/5 1-3 小时 新手友好度 68/100