From owner-freebsd-current Wed Sep 10 05:46:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id FAA28487 for current-outgoing; Wed, 10 Sep 1997 05:46:12 -0700 (PDT) Received: from gw.itfs.nsk.su (gw.itfs.nsk.su [193.124.36.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id FAA28477 for ; Wed, 10 Sep 1997 05:45:48 -0700 (PDT) Received: from itfs.UUCP (uucp@localhost) by gw.itfs.nsk.su (8.6.12/8.6.12) with UUCP id TAA17699 for current@freebsd.org; Wed, 10 Sep 1997 19:45:35 +0700 Received: by itfs.nsk.su; Wed, 10 Sep 97 19:41:36 +0700 (NST) Received: (from daemon@localhost) by news.itfs.nsk.su (8.7.5/8.6.12) id TAA18892; Wed, 10 Sep 1997 19:39:12 +0700 (NSD) From: nnd@itfs.nsk.su To: current@freebsd.org Subject: PPP - why set CLOCAL for server ('-direct' mode) ? Date: 10 Sep 1997 12:39:11 GMT Message-ID: <5v64df$gsa@news.itfs.nsk.su> Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I try to construct a 'dial-in-access-server' from IBM PC-compatible with Cyclades' Cyclom-16YeP multiport board, some cheap modems and FreeBSD-3.0. I've discover that if I start '/usr/sbin/ppp' as: /usr/sbin/ppp -direct user-label (from small script setted as as user's shell) then it sets 'CLOCAL' flag for modem and as a result 'ppp' process does'nt received 'SIGHUP' on modem's carrier drop. What is the purpose of such ('CLOCAL') setting in '-direct' mode ? N.Dudorov P.S. If this is just an oversight I append a patch for /usr/src/usr.sbin/ppp/modem.c ;-) --- modem.c.ORIG Wed Sep 10 13:54:34 1997 +++ modem.c Wed Sep 10 13:55:43 1997 @@ -566,10 +566,9 @@ } tcgetattr(modem, &rstio); cfmakeraw(&rstio); + if (!(mode & MODE_DIRECT)) rstio.c_cflag |= CLOCAL; if (VarCtsRts) - rstio.c_cflag |= CLOCAL | CCTS_OFLOW | CRTS_IFLOW; - else - rstio.c_cflag |= CLOCAL; + rstio.c_cflag |= CCTS_OFLOW | CRTS_IFLOW; if (!(mode & MODE_DEDICATED)) rstio.c_cflag |= HUPCL;