Date: Sun, 8 Dec 1996 16:16:28 +1100 From: Bruce Evans <bde@zeta.org.au> To: bde@zeta.org.au, j@uriah.heep.sax.de Cc: freebsd-bugs@freefall.freebsd.org, scrappy@freefall.freebsd.org, uhclem@nemesis.lonestar.org Subject: Re: 2.x telnetd handles CTRL-M differently than other ttys FDIV044 Message-ID: <199612080516.QAA15524@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> Here is a half baked fix for the problem demonstrated by the program. >> ICRNL works now. Unusual settings like INLCR and IGNCR are still broken. > >I think that's the wrong approach. According to my tcpdump, and to >the RFCs, the mere problem is that the telnet client sends \r only >where the RFC requires it to send \r\n if LINE and EDIT modes are >turned on. telnetd seems to rely on this, and only converts \r\n back >to the local EOL character, but not a sole \r as it is sent by >FreeBSD's telnet client. But EDIT mode isn't turned on. The program is in icanon (cbreak) mode. \r\n is sent correctly in EDIT mode. \r and \n have to be handled separately in icanon mode for termios semantics to work. telnetd was already careful not to translate \r\n except in "CRMOD" mode. It does the translation only if the mode is !inbinary && icrnl. This has a chance of working for sgttyb but no chance for termios. There are about 2^8 times as many combinations of the the flags for termios, and even the usual ones don't map very well to telnet modes. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612080516.QAA15524>
