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
調査の方向性
ルーティングされた IPv4 ACL ルールが生成される systemvm/debian/opt/cloud/bin/configure.py の CsAcl.AclDevice.__process_routing_ip4() から始めます。IPv4 のマッチ条件を正しい IPv6 の経路と比較し、再現手順に従って生成されたルールを確認します。プロトコル 47 の ACL ルールを追加し、VR 上で nft list table ip ip4_acl を調べます。IPv4 ルールが ip protocol を使用し、ログに記録された nft エラーなしで ACL テーブルに表示されれば完了です。
索引モデルが 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日 6時間
- マージ済み PR(30日)
- 11
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/cloudstack のほかの issue
-
[UI] "canceled - Unable to reach the management server" notification when switching from project to default view on Instances page (4.20.3)対応中かも @Damans227 が 1 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
apache/cloudstack#14381 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
listPublicIpAddresses NullPointerException on shared networks with a VR (4.22)対応中かも @MitchDrage が 19 日前に担当しました。 オープン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 が 20 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/cloudstack#14244 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Resize volume API validation errors are not displayed in the UI対応中かも @sathvikaragi が 22 日前に担当しました。 オープン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
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug new windows
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
GantMan/jail-monkey#380 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
objectionary/jucs#145 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
objectionary/lints#1559 ·
メンテナーはふだん 2 日以内に返信