Issue with NetConf : ArgumentOutOfRangeException
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 4.4k
- フォーク
- 993
- 平均マージ
- 9日 21時間
- マージ済み PR(30日)
- 1
説明
When an rpc-reply message is received, this exception is thrown in NetconfSession.OnDataReceived event handler.
The cause is that the received data length is 1015 byte, and the decoded message string contains a magic number at the beginning as below:
#1585
This number is matched with a regex then is used to append this length of data to a stringbuilder, namely to _rpcreply object, like :
var match = Regex.Match(chunk.Substring(position), @"\n#(?<length>\d+)\n");
if (!match.Success)
{
break;
}
var fractionLength = Convert.ToInt32(match.Groups["length"].Value);
_rpcReply.Append(chunk, position + match.Index + match.Length, fractionLength);
where the value of position is the number at the beginning of the message, that is, 1585 in this example.
It is obvious that the Append operation will fail as one can't append 1585 byte from an 1015 byte length string.
What I can't figure out is where this magic number is coming from, as RFC6241 apparently does not contain such - lets call it - segment length element ? So where is it coming from, can anyone tell ?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
NetconfSession.OnDataReceived から始め、#length マーカーを読み取る正規表現と _rpcReply の追加処理に注目してください。このフレーミングを関連する NETCONF 仕様と比較し、受信したチャンクがどのように分割されるかを調査してください。完了条件は、マーカーの出どころを特定し、報告された rpc-reply で発生する範囲外エラーを解決することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- networking
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100