[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  Reply to IAC WILL/WONT ECHO
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Reply to IAC WILL/WONT ECHO

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Falanyx   (4 posts)  [Biography] bio
Date Mon 21 Jul 2014 12:42 AM (UTC)

Amended on Mon 21 Jul 2014 12:43 AM (UTC) by Falanyx

Message
MUSHclient does not respond to IAC WILL ECHO or IAC WONT ECHO in a manner as defined by the following RFCs:
RFC 854 - Telnet Specification [1]
RFC 857 - Telnet ECHO Option [2]

Expected behaviour:

On receive IAC WILL ECHO
  If ignoring 'No Echo' messages
    Reply IAC DONT ECHO
  Else
    Reply IAC DO ECHO
On receive IAC WONT ECHO
  Reply IAC DONT ECHO


Current behaviour:
Client does not reply for ECHO Telopt.

Scope:
While most MUD servers implement ECHO loosely and don't expect a reply back, those that implement RFC 1143 [3] strictly will have to force a state change for any changes after the first IAC WILL ECHO. An example of an implementation affected by this is libtelnet [4].

Confirmed with:
v4.85
Current Git (v4.93)

Patch:

diff --git a/telnet_phases.cpp b/telnet_phases.cpp
index 765c01b..358e5ab 100644
--- a/telnet_phases.cpp
+++ b/telnet_phases.cpp
@@ -291,7 +291,10 @@ void CMUSHclientDoc::Phase_WILL (const unsigned char c)
               {
               m_bNoEcho = true;
               TRACE ("Echo turned off\n");
+              Send_IAC_DO (c);
               }
+          else
+              Send_IAC_DONT (c);
           break; // end of TELOPT_ECHO

     case TELOPT_MXP:
@@ -352,6 +355,7 @@ void CMUSHclientDoc::Phase_WONT (const unsigned char c)
           m_bNoEcho = false;
           TRACE ("Echo turned on\n");
           }
+          Send_IAC_DONT (c);
           break; // end of TELOPT_ECHO

     default:


References:
[1] http://www.ietf.org/rfc/rfc854.txt
[2] http://www.ietf.org/rfc/rfc857.txt
[3] http://www.ietf.org/rfc/rfc1143.txt
[4] https://github.com/seanmiddleditch/libtelnet

Edits:
1 - Forums ate some indentation. Wrapped in code tags.
[Go to top] top

Posted by Nick Gammon   Australia  (21,388 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 21 Jul 2014 05:18 AM (UTC)
Message
Fixed. See:

https://github.com/nickgammon/mushclient/commit/c284ba5

Thanks.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


1,941 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]