Routed network ACL rules with a protocol number are not applied on the VR (ip nexthdr instead of ip protocol)
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- linux, python
- Lĩnh vực
- networking
Hướng nghiên cứu
Bắt đầu tại systemvm/debian/opt/cloud/bin/configure.py, ở CsAcl.AclDevice.__process_routing_ip4(), nơi các quy tắc ACL IPv4 được định tuyến được tạo. So sánh điều kiện khớp IPv4 với đường xử lý IPv6 chính xác và xác nhận quy tắc được tạo theo các bước tái hiện: thêm một quy tắc ACL cho giao thức 47, sau đó kiểm tra nft list table ip ip4_acl trên VR. Hoàn tất khi quy tắc IPv4 sử dụng ip protocol và xuất hiện trong bảng ACL mà không có lỗi nft được ghi lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.4k
- Merge trung bình
- 10 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/cloudstack
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
apache/cloudstack#14381 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
listPublicIpAddresses NullPointerException on shared networks with a VR (4.22)Có thể đã có người làm @MitchDrage đã nhận 17 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
apache/cloudstack#14248 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CKS: upgradeKubernetesCluster fails on control node when binaries ISO ships headlamp.yaml instead of dashboard.yamlCó thể đã có người làm @mw-0 đã nhận 18 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/cloudstack#14244 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Resize volume API validation errors are not displayed in the UICó thể đã có người làm @sathvikaragi đã nhận 21 ngày trước. Đang mởbug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/cloudstack#14222 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
create-kubernetes-binaries-iso.sh builds the ISO without setting a volume ID on EL8 based os'sĐang mởbug component:kubernetes
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
apache/cloudstack#14180 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/cloudstack
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
apache/rocketmq-dashboard#6610 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Citationcount column sorts alphabetically instead of numericallyCó thể đã có người làm @kpunia306 đã nhận hôm nay. Đang mởstatus: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
JabRef/jabref#17459 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`RedisList.reversed()` view returns an empty `range` and `trim` removes all elementsCó thể đã có người làm @CCCLL đã nhận hôm nay. Đang mởstatus: waiting-for-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
spring-projects/spring-data-redis#3461 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
javapathfinder/jpf-core#649 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
devops-thiago/ThrillhouseBot#1093 ·
Maintainer thường phản hồi trong vòng 1 ngày