Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Routed network ACL rules with a protocol number are not applied on the VR (ip nexthdr instead of ip protocol)

未关闭 适合新手
#14,351 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@bhouse-nexthop 已经在做这个了。

开始于 2026年10月8日。

  • #14352 来自 @bhouse-nexthop —— 未关闭

评估

难度
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 内容生成。

描述

component:virtual-router
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
  1. Create a VPC in routed mode with an IPv4 tier. (Network ACLs only exist on VPC tiers.)
  2. Add an ACL rule to the tier's ACL list: protocol number 47, CIDR 0.0.0.0/0, action Allow.
  3. On the VR, run nft list table ip ip4_acl. The rule is missing from ethX_ingress_policy.
  4. grep "ip nexthdr" /var/log/cloud.log shows the failed nft 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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/cloudstack 的其他 Issue

查看 apache/cloudstack 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。