メインコンテンツまでスキップ

規則: DONT/WONT 要求を記憶する

TELNET 実装は、DONT/WONT 折衝を開始したことを記憶しなければならない。

議論:

RFC 854 からは、TELNET が DONT/WONT 折衝の開始を記憶しなければならないかどうかは明らかでない。DONT/WONT 折衝の開始を記憶する理由はないように思われる。1. DO/WILL 折衝を記憶する理由(すなわち、有効化のための折衝中という状態がデータ ストリームにとって「オプションが有効」という状態とは異なる意味を持つこと)は当てはまらない。2. DONT/WONT への応答において、もう一方の側に選択の余地はない。オプションはいずれ無効になる。3. 直ちにオプションを無効化して折衝を忘れてしまえば、オプションは無効なので WONT/DONT 応答を無視することになる。

残念ながら、この結論は誤りである。次の二者、「われわれ」と「彼」の間の TELNET の会話を考えてみよ。(本 RFC の読者は、別の見方のために各手順を時系列に並べ替えてもよい。)

ループ例 1

         Both sides know that the option is on.

On his side:
1 He decides to disable. He sends DONT and disables the option.
2 He decides to reenable. He sends DO and remembers he is
negotiating.
5 He receives WONT and gives up on negotiation.
6 He decides to try once again to reenable. He sends DO and
remembers he is negotiating.
7 He receives WONT and gives up on negotiation.
For whatever reason, he decides to agree with future requests.
10 He receives WILL and agrees. He responds DO and enables the
option.
11 He receives WONT and sighs. He responds DONT and disables the
option.
(repeat 10 and then 11, forever)

On our side:
3 We receive DONT and sigh. We respond WONT and disable the
option.
4 We receive DO but disagree. We respond WONT.
8 We receive DO and decide to agree. We respond WILL and enable
the option.
9 We decide to disable. We send WONT and disable the option.
For whatever reason, we decide to agree with future requests.
12 We receive DO and agree. We send WILL and enable the option.
13 We receive DONT and sigh. We send WONT and disable the option.
(repeat 12 and then 13, forever)

双方は RFC 854 に従っている。しかし、最終的にオプション折衝ループに陥る。DONT DO DO に続く DO DONT が一方向のネットワークを永遠に巡り、WONT WONT に続く WILL WONT がもう一方の方向を永遠に巡る。手順 1 と 9 の挙動がこのループの原因である。ゆえに本節の規則がある。後述の第 6 節では、「無効化のための折衝」と「有効化のための折衝」に別々の状態が必要か、単一の「折衝」状態で足りるかを論じる。