Subject: SCC does not properly handle lost carrier
To: None <port-pmax@NetBSD.ORG>
From: maximum entropy <entropy@zippy.bernstein.com>
List: port-pmax
Date: 04/10/1997 06:18:08
TTYs connected to an SCC port do not properly track carrier detect. I
consider this a serious problem -- consider a situation where you're
logged in and su'd to root, you lose carrier, and some evil person
dials in and gets the line you were on.
I noticed this problem because I was trying to set up a SLIP
connection via one of the ports on my 5000/120, and sliplogin was not
getting a SIGHUP when the line dropped.
The code in scc.c has some vague comments that seem to indicate this
code was commented out to fix a problem with console handling.
However, when I enabled the code, I was able to use a serial console
with no obvious problem. Can anyone shed some light on this?
Anyway, here's a patch to re-enable the carrier detect code.
--- /usr/src/sys/arch/pmax/tc/scc.c-orig Wed Oct 16 20:35:19 1996
+++ /usr/src/sys/arch/pmax/tc/scc.c Thu Apr 10 04:11:55 1997
@@ -1448,14 +1448,12 @@
* Is it related to console handling?
*/
#ifndef alpha
-#ifdef notyet /*XXX -does this help pmax console? */
if (car) {
/* carrier present */
if (!(tp->t_state & TS_CARR_ON))
(void)(*linesw[tp->t_line].l_modem)(tp, 1);
} else if (tp->t_state & TS_CARR_ON)
(void)(*linesw[tp->t_line].l_modem)(tp, 0);
-#endif /*notyet*/
#endif /* !alpha */
splx(s);
}
--
entropy -- it's not just a good idea, it's the second law.