NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/43179: Strange input control of telnet LINEMODE in current (TIOCPKT_IOCTL does not work)



>Number:         43179
>Category:       kern
>Synopsis:       Strange input control of telnet LINEMODE in current 
>(TIOCPKT_IOCTL does not work)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 19 13:10:00 +0000 2010
>Originator:     Yasushi Oshima
>Release:        NetBSD 5.99.27
>Organization:
>Environment:
NetBSD amd64 5.99.27 NetBSD 5.99.27 (GENERIC) #4: Mon Apr 19 20:55:39 JST 2010
oshima@amd64:/usr/src/sys/arch/amd64/compile/GENERIC amd64

>Description:
When I run vi(1) on a telnet session, edit-control does not effect immediately
till 'Enter-Key' input like 'half-duplex'.
In top(1), 'q' is also the same till 'Enter'.

In character mode on telnet, this does not occur.

This occurs after sys/kern/tty_pty.c rev.1.118.

>How-To-Repeat:
1. Enable telnetd, and login by telnet to NetBSD system.
2. Run vi(1) and input any key in edit-mode.
3. Run top(1), and input 'q'.

>Fix:
Because tty_pty.c rev.1.118 will clear pti->pt_send  first, the code 
of checking TIOCPKT_IOCTL flag allows always false.

This should use the preserved value (c).

--- sys/kern/tty_pty.c   24 Jan 2010 19:56:26 -0000      1.121
+++ sys/kern/tty_pty.c   19 Apr 2010 12:45:06 -0000
@@ -615,7 +615,7 @@
                                 * relevant only if the tty got closed and then
                                 * opened again while we were out uiomoving.
                                 */
-                               if (pti->pt_send & TIOCPKT_IOCTL) {
+                               if (c & TIOCPKT_IOCTL) {
                                        cc = min(uio->uio_resid,
                                                sizeof(tp->t_termios));
                                        uiomove((void *) &tp->t_termios,



Home | Main Index | Thread Index | Old Index