From owner-freebsd-current Mon Dec 13 10:59:20 1999 Delivered-To: freebsd-current@freebsd.org Received: from awfulhak.org (dynamic-25.max4-du-ws.dialnetwork.pavilion.co.uk [212.74.9.153]) by hub.freebsd.org (Postfix) with ESMTP id B0DA11517A; Mon, 13 Dec 1999 10:59:10 -0800 (PST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by awfulhak.org (8.9.3/8.9.3) with ESMTP id SAA00803; Mon, 13 Dec 1999 18:59:08 GMT (envelope-from brian@lan.awfulhak.org) Received: from hak.lan.Awfulhak.org (localhost.lan.Awfulhak.org [127.0.0.1]) by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id RAA00338; Mon, 13 Dec 1999 17:59:24 GMT (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <199912131759.RAA00338@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.0 09/18/1999 To: "CHOI, Junho" Cc: Jon Hamilton , current@FreeBSD.ORG, stable@FreeBSD.ORG, brian@hak.lan.Awfulhak.org Subject: Re: ppp over pty: trying to detect CD In-Reply-To: Message from "CHOI, Junho" of "12 Dec 1999 19:16:52 +0900." <86bt7wlazv.fsf@gradius.myhome> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 13 Dec 1999 17:59:24 +0000 From: Brian Somers Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ah, I see the problem. I have a fix - I'm about to apply it to -current and ask jkh for permission to MFC. I've attached the -stable patch for your viewing enjoyment.... > >>>>> "JH" == Jon Hamilton writes: > > JH> Running -current from this afternoon, I am having a strange > JH> symptom with ppp over a pty; ppp does not detect that the pty > JH> does not support carrier, and will cycle once per second > JH> waiting for CD to appear. Putting ``set cd off'' in my > JH> ppp.conf for that target fixed the problem, but I thought I'd > JH> mention it nonetheless, since that didn't used to be > JH> required. Certainly not all that big a deal, but I thought it > JH> was worth a mention. > > JH> FreeBSD 4.0-CURRENT #13: Sat Dec 11 20:31:42 CST 1999 > > I am using 3-STABLE but I have the same problem with you. I think it > comes after adding pppoe support in pppd(after 3.3-RELEASE). I am > -STABLE user but I had to back to 3.3-RELEASE's ppp... I am using ADSL > service with pptpclient. > > JH> and the syslog with debugging turned on, with no "set cd" in the config: > > JH> Dec 11 20:48:20 woodstock ppp[3106]: tun1: Debug: deflink: Using tty_Timeout [0x8072d44] > JH> Dec 11 20:48:20 woodstock ppp[3106]: tun1: Debug: Waiting for carrier > JH> Dec 11 20:48:21 woodstock ppp[3106]: tun1: Debug: deflink: Using tty_Timeout [0x8072d44] > JH> Dec 11 20:48:21 woodstock ppp[3106]: tun1: Debug: Waiting for carrier > > JH> [ and on and on and on ] > > -- > +++ Any opinions in this posting are my own and not those of my employers +++ > CHOI, Junho > - Korea FreeBSD Users Group > - Public Service, Youido Post Office - Web Data Bank -- Brian Don't _EVER_ lose your sense of humour ! Index: tty.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/ppp/tty.c,v retrieving revision 1.12.2.3 diff -u -r1.12.2.3 tty.c --- tty.c 1999/11/19 23:48:04 1.12.2.3 +++ tty.c 1999/12/13 07:30:44 @@ -112,6 +112,7 @@ log_Printf(LogDEBUG, "%s: ioctl error (%s)!\n", p->link.name, strerror(errno)); timer_Stop(&dev->Timer); + dev->mbits = TIOCM_CD; return; } } else @@ -187,8 +188,7 @@ return CARRIER_PENDING; /* Not yet ! */ } - return Online(dev) || !p->cfg.cd.necessity == CD_REQUIRED ? - CARRIER_OK : CARRIER_LOST; + return Online(dev) ? CARRIER_OK : CARRIER_LOST; } static int To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message