Updating a SIP dispatch rule or inbound trunk to new trunks or numbers skips the conflict check
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
Start in the update handlers for SIP dispatch rules and inbound trunks, comparing them with the conflict check in the create path for CreateSIPDispatchRule. The bug is that the filter runs on the stored copy, not the updated object, so the conflict check misses the new trunk IDs or numbers. Pull request #4978 is already open against this, so check it before starting. Done means an update that would conflict returns InvalidArgument and leaves the stored rule unchanged.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
CreateSIPDispatchRule rejects a dispatch rule that conflicts with an existing rule for the same trunk, numbers, and PIN. UpdateSIPDispatchRule accepts the same conflict when the update changes the rule's trunk IDs. UpdateSIPInboundTrunk has the same gap when the update changes the trunk's numbers.
The update handlers list stored objects filtered by the new trunk IDs or numbers, and then swap in the updated object for its stored copy. The stored copy still has the old values, so the filter drops it, and the updated object is never validated.
To reproduce
- Create dispatch rule A with
trunk_ids: ["ST_2"]and a direct rule to rooma. - Create dispatch rule B with
trunk_ids: ["ST_1"]and a direct rule to roomb. - Call
UpdateSIPDispatchRulefor B withupdate.trunk_ids.set: ["ST_2"].
The update succeeds. Creating B with trunk_ids: ["ST_2"] in step 2 fails with Dispatch rule for the same trunk, inbound number, number, and PIN combination already exists.
After the update, inbound calls on ST_2 fail to match a dispatch rule, because MatchDispatchRuleIter reports the conflict at call time.
Expected behavior
The update returns InvalidArgument with the same conflict error as creation, and the stored rule is unchanged.
Server
- Version: current
master
- 主要言語
- Go
- スター
- 21.3k
- フォーク
- 2.4k
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 87
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
livekit/livekit のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 44/100
livekit/livekit#4982 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 12/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
livekit/livekit#4959 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
livekit/livekit#4932 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
livekit/livekit#4931 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
livekit/livekit の issue をすべて見る
似ている issue
-
documentation hacktoberfest priority: low skill: good first issue status: ready for dev
難易度 2/5 半日 初心者へのやさしさ 85/100
hyperledger-labs/fabric-smart-client#2142 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
numberly/vault-db-injector#107 ·
メンテナーはふだん 1 日以内に返信
-
area/import kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
[DOC] Wrong sg_egress_ports range in the Terraform Databricks Guide for AWS Hub & Spoke with Network Firewall対応中かも @akhil9tiet が今日担当しました。 オープンdocs
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
databricks/terraform-provider-databricks#6080 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
kind/documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
kubernetes-sigs/dra-driver-nvidia-gpu#1569 ·
メンテナーはふだん 1 日以内に返信