From owner-freebsd-current Fri Oct 25 12:46: 3 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 693A237B404 for ; Fri, 25 Oct 2002 12:46:00 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FB8E43E42 for ; Fri, 25 Oct 2002 12:45:59 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id FAA05861; Sat, 26 Oct 2002 05:45:26 +1000 Date: Sat, 26 Oct 2002 05:56:37 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Bakul Shah Cc: Brooks Davis , Dave Evans , Subject: Re: pppd not working on latest current 2002-10-20 In-Reply-To: <200210251841.OAA09782@valiant.cnchost.com> Message-ID: <20021026054152.N5135-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 25 Oct 2002, Bakul Shah wrote: > > On Fri, Oct 25, 2002 at 06:15:55PM +0000, Dave Evans wrote: > > > Is anyone using pppd on CURRENT. somewhere between may and October it > > > seems to have broken. My KERNEL is GENERIC, my sources are dated cvs > > > -D2002-10-20, but I now get a message about needing facilities in the > > > kernel. However, the kernel has many ppp entry points, I haven't > > > modified GENERIC which loads the ppp device, I've tried loading modules > > > with ppp in their name all to no avail. > > > > You need to create an interface first. Run "ifconfig ppp create". > > Until pppd is taught to create the interface if one doesn't > exist, this information needs to be in /usr/src/UPDATING. The kernel side of ppp was changed to create 0 ppp interfaces by default. This is incompatible with the user side of ppp, which determines if ppp is in the kernel by checking if there is a ppp interface. I use the following low-quality work around: %%% Index: sys-bsd.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/pppd/sys-bsd.c,v retrieving revision 1.18 diff -u -2 -r1.18 sys-bsd.c --- sys-bsd.c 17 Sep 2002 15:52:35 -0000 1.18 +++ sys-bsd.c 17 Sep 2002 19:16:58 -0000 @@ -183,4 +183,19 @@ return 1; /* can't tell */ + /* + * XXX interface doesn't exist until you look at it right. + * devfs me harder. + */ + { + int fd, newdisc, olddisc; + + fd = open("/dev/cuaa1", O_RDWR); /* XXX my tty hard-coded. */ + ioctl(fd, TIOCGETD, &olddisc); /* XXX no error handling. */ + newdisc = PPPDISC; + ioctl(fd, TIOCSETD, &newdisc); /* XXX no error handling. */ + ioctl(fd, TIOCSETD, &olddisc); /* XXX no error handling. */ + close(fd); + } + strncpy(ifr.ifr_name, "ppp0", sizeof (ifr.ifr_name)); ok = ioctl(s, SIOCGIFFLAGS, (caddr_t) &ifr) >= 0; %%% devfs is not really involved here. The bug just belongs to the same class of complications given by devfs. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message