Rule: Remember DONT/WONT requests
A TELNET implementation MUST remember starting a DONT/WONT negotiation.
DISCUSSION:
It is not clear from RFC 854 whether or not TELNET must remember beginning a DONT/WONT negotiation. There seem to be no reasons to remember starting a DONT/WONT negotiation: 1. The argument for remembering a DO/WILL negotiation (viz., the state of negotiating for enabling means different things for the data stream than the state of having the option enabled) does not apply. 2. There is no choice for the other side in responding to a DONT/WONT; the option is going to end up disabled. 3. If we simply disable the option immediately and forget negotiating, we will ignore the WONT/DONT response since the option is disabled.
Unfortunately, that conclusion is wrong. Consider the following TELNET conversation between two parties, "us" and "him". (The reader of this RFC may want to sort the steps into chronological order for a different view.)
LOOP EXAMPLE 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)
Both sides have followed RFC 854; but we end in an option negotiation loop, as DONT DO DO and then DO DONT forever travel through the network one way, and WONT WONT followed by WILL WONT forever travel through the network the other way. The behavior in steps 1 and 9 is responsible for this loop. Hence this section's rule. In Section 6 below is discussion of whether separate states are needed for "negotiate for disable" and "negotiate for enable" or whether a single "negotiate" state suffices.